summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorZephyron <zephyron@citron-emu.org>2025-01-15 16:44:07 +1000
committerZephyron <zephyron@citron-emu.org>2025-01-15 16:44:07 +1000
commit236ad28d61d94d0848c863e2cefa168f75813f49 (patch)
tree025ad3a47d34f8526a341270cab67b68d72dc179 /CMakeLists.txt
parent9ae0eeeb870899e00121b01380d9699b6e768d34 (diff)
feat: Improve thermal display and build system
- Replace emoji thermal indicators with modern progress bar UI - Switch temperature source to battery sensor for better accuracy - Adjust temperature thresholds (30°C-45°C range) - Add automatic Vulkan Validation Layer download for Android - Downgrade Java/Kotlin target to 17 for wider compatibility The thermal display now shows a visual progress bar with percentage instead of emojis, making it easier to gauge system temperature at a glance. Temperature reading now comes from the battery sensor which is more reliable across devices. Build system improvements include automated VVL binary downloads and installation for Android builds when CITRON_DOWNLOAD_ANDROID_VVL is enabled. Java target downgraded to 17 to ensure compatibility with current Android toolchain.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 20 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a210c682b..5f1fabf78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,7 +97,26 @@ if (ANDROID OR WIN32 OR APPLE)
endif()
option(ENABLE_OPENSSL "Enable OpenSSL backend for ISslConnection" ${DEFAULT_ENABLE_OPENSSL})
-# Copy the VVL arm64 binary to src/android/app/main/jniLibs. REF: https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions/workflows/vvl.yml
+if (ANDROID AND CITRON_DOWNLOAD_ANDROID_VVL)
+ set(vvl_version "sdk-1.3.261.1")
+ set(vvl_zip_file "${CMAKE_BINARY_DIR}/externals/vvl-android.zip")
+ if (NOT EXISTS "${vvl_zip_file}")
+ # Download and extract validation layer release to externals directory
+ set(vvl_base_url "https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download")
+ file(DOWNLOAD "${vvl_base_url}/${vvl_version}/android-binaries-${vvl_version}-android.zip"
+ "${vvl_zip_file}" SHOW_PROGRESS)
+ execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${vvl_zip_file}"
+ WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals")
+ endif()
+
+ # Copy the arm64 binary to src/android/app/main/jniLibs only if it doesn't exist
+ set(vvl_lib_path "${CMAKE_CURRENT_SOURCE_DIR}/src/android/app/src/main/jniLibs/arm64-v8a/")
+ set(vvl_lib_file "${vvl_lib_path}/libVkLayer_khronos_validation.so")
+ if (NOT EXISTS "${vvl_lib_file}")
+ file(COPY "${CMAKE_BINARY_DIR}/externals/android-binaries-${vvl_version}/arm64-v8a/libVkLayer_khronos_validation.so"
+ DESTINATION "${vvl_lib_path}")
+ endif()
+endif()
if (ANDROID)
set(CMAKE_SKIP_INSTALL_RULES ON)