From 43657184606224f7588d22bfcb569b58898523a7 Mon Sep 17 00:00:00 2001 From: Oil Date: Wed, 9 Apr 2025 19:18:45 +0300 Subject: [PATCH] Fix build on Android x86_64 target (#92) * Fix build on Android x86_64 target * Fixed formatting --- 3rdparty/CMakeLists.txt | 2 +- rpcs3/Emu/RSX/VK/vkutils/instance.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 6e9668ef3..01f2b8938 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -395,7 +395,7 @@ else() add_library(3rdparty::libusb ALIAS usb-1.0-static) endif() -if (ANDROID) +if (ANDROID AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") add_subdirectory(libadrenotools) else() add_library(adrenotools INTERFACE) diff --git a/rpcs3/Emu/RSX/VK/vkutils/instance.cpp b/rpcs3/Emu/RSX/VK/vkutils/instance.cpp index 791cbfbff..07c241766 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/instance.cpp +++ b/rpcs3/Emu/RSX/VK/vkutils/instance.cpp @@ -4,12 +4,15 @@ #ifdef ANDROID #include -#include "libadrenotools/include/adrenotools/priv.h" -#include #include #include #endif +#if defined(ANDROID) && defined(ARCH_ARM64) +#include "libadrenotools/include/adrenotools/priv.h" +#include +#endif + namespace vk { // Supported extensions @@ -80,7 +83,7 @@ namespace vk VK_GET_SYMBOL(vkDestroyInstance)(m_instance, nullptr); m_instance = VK_NULL_HANDLE; -#ifdef ANDROID +#if defined(ANDROID) && defined(ARCH_ARM64) if (owns_loader && g_vk_loader != nullptr) { adrenotools_set_turbo(false); @@ -116,7 +119,7 @@ namespace vk #endif bool instance::create(const char* app_name, bool fast) { -#ifdef ANDROID +#if defined(ANDROID) && defined(ARCH_ARM64) if (g_vk_loader == nullptr) { auto custom_driver_path = g_cfg.video.vk.driver.path.to_string();