diff options
| author | 2023-03-16 11:56:51 -0400 | |
|---|---|---|
| committer | 2023-06-03 00:05:43 -0700 | |
| commit | 616cf70a801ccf7c2312118d163185a8d341e517 (patch) | |
| tree | 063170927625dfda9151bf20a5f2d44da6fc51b7 /src/android | |
| parent | android: Use Skyline's document provider (diff) | |
| download | yuzu-616cf70a801ccf7c2312118d163185a8d341e517.tar.gz yuzu-616cf70a801ccf7c2312118d163185a8d341e517.tar.xz yuzu-616cf70a801ccf7c2312118d163185a8d341e517.zip | |
build: only enable adrenotools on arm64
Diffstat (limited to 'src/android')
| -rw-r--r-- | src/android/app/build.gradle | 5 | ||||
| -rw-r--r-- | src/android/app/src/main/jni/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/android/app/src/main/jni/native.cpp | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/android/app/build.gradle b/src/android/app/build.gradle index 8b621f5d5..7e2717b11 100644 --- a/src/android/app/build.gradle +++ b/src/android/app/build.gradle | |||
| @@ -10,7 +10,6 @@ plugins { | |||
| 10 | */ | 10 | */ |
| 11 | def autoVersion = (int) (((new Date().getTime() / 1000) - 1451606400) / 10) | 11 | def autoVersion = (int) (((new Date().getTime() / 1000) - 1451606400) / 10) |
| 12 | def buildType | 12 | def buildType |
| 13 | def abiFilter = "arm64-v8a" //, "x86" | ||
| 14 | 13 | ||
| 15 | android { | 14 | android { |
| 16 | namespace 'org.yuzu.yuzu_emu' | 15 | namespace 'org.yuzu.yuzu_emu' |
| @@ -44,7 +43,7 @@ android { | |||
| 44 | targetSdkVersion 33 | 43 | targetSdkVersion 33 |
| 45 | versionCode autoVersion | 44 | versionCode autoVersion |
| 46 | versionName getVersion() | 45 | versionName getVersion() |
| 47 | ndk.abiFilters abiFilter | 46 | ndk.abiFilters "arm64-v8a", "x86_64" |
| 48 | } | 47 | } |
| 49 | 48 | ||
| 50 | signingConfigs { | 49 | signingConfigs { |
| @@ -115,7 +114,7 @@ android { | |||
| 115 | "-DYUZU_USE_BUNDLED_VCPKG=ON", | 114 | "-DYUZU_USE_BUNDLED_VCPKG=ON", |
| 116 | "-DYUZU_USE_BUNDLED_FFMPEG=ON" | 115 | "-DYUZU_USE_BUNDLED_FFMPEG=ON" |
| 117 | 116 | ||
| 118 | abiFilters abiFilter | 117 | abiFilters "arm64-v8a", "x86_64" |
| 119 | } | 118 | } |
| 120 | } | 119 | } |
| 121 | } | 120 | } |
diff --git a/src/android/app/src/main/jni/CMakeLists.txt b/src/android/app/src/main/jni/CMakeLists.txt index f80c166f4..21c27d4ee 100644 --- a/src/android/app/src/main/jni/CMakeLists.txt +++ b/src/android/app/src/main/jni/CMakeLists.txt | |||
| @@ -13,6 +13,9 @@ add_library(yuzu-android SHARED | |||
| 13 | set_property(TARGET yuzu-android PROPERTY IMPORTED_LOCATION ${FFmpeg_LIBRARY_DIR}) | 13 | set_property(TARGET yuzu-android PROPERTY IMPORTED_LOCATION ${FFmpeg_LIBRARY_DIR}) |
| 14 | 14 | ||
| 15 | target_link_libraries(yuzu-android PRIVATE audio_core common core input_common) | 15 | target_link_libraries(yuzu-android PRIVATE audio_core common core input_common) |
| 16 | target_link_libraries(yuzu-android PRIVATE android camera2ndk EGL glad inih jnigraphics adrenotools log) | 16 | target_link_libraries(yuzu-android PRIVATE android camera2ndk EGL glad inih jnigraphics log) |
| 17 | if (ARCHITECTURE_arm64) | ||
| 18 | target_link_libraries(yuzu-android PRIVATE adrenotools) | ||
| 19 | endif() | ||
| 17 | 20 | ||
| 18 | set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} yuzu-android) | 21 | set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} yuzu-android) |
diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 3cfbec87c..6e670e899 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp | |||
| @@ -7,7 +7,9 @@ | |||
| 7 | #include <string_view> | 7 | #include <string_view> |
| 8 | #include <dlfcn.h> | 8 | #include <dlfcn.h> |
| 9 | 9 | ||
| 10 | #ifdef ARCHITECTURE_arm64 | ||
| 10 | #include <adrenotools/driver.h> | 11 | #include <adrenotools/driver.h> |
| 12 | #endif | ||
| 11 | 13 | ||
| 12 | #include <android/api-level.h> | 14 | #include <android/api-level.h> |
| 13 | #include <android/native_window_jni.h> | 15 | #include <android/native_window_jni.h> |
| @@ -76,6 +78,7 @@ public: | |||
| 76 | void InitializeGpuDriver(const std::string& hook_lib_dir, const std::string& custom_driver_dir, | 78 | void InitializeGpuDriver(const std::string& hook_lib_dir, const std::string& custom_driver_dir, |
| 77 | const std::string& custom_driver_name, | 79 | const std::string& custom_driver_name, |
| 78 | const std::string& file_redirect_dir) { | 80 | const std::string& file_redirect_dir) { |
| 81 | #ifdef ARCHITECTURE_arm64 | ||
| 79 | void* handle{}; | 82 | void* handle{}; |
| 80 | const char* file_redirect_dir_{}; | 83 | const char* file_redirect_dir_{}; |
| 81 | int featureFlags{}; | 84 | int featureFlags{}; |
| @@ -101,6 +104,7 @@ public: | |||
| 101 | } | 104 | } |
| 102 | 105 | ||
| 103 | m_vulkan_library = std::make_shared<Common::DynamicLibrary>(handle); | 106 | m_vulkan_library = std::make_shared<Common::DynamicLibrary>(handle); |
| 107 | #endif | ||
| 104 | } | 108 | } |
| 105 | 109 | ||
| 106 | bool IsRunning() const { | 110 | bool IsRunning() const { |