fix: android startup

This commit is contained in:
SkullzOTS 2025-07-06 15:05:06 -03:00 committed by GitHub
parent 475bed4f96
commit a21675cd70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 4 deletions

View file

@ -60,6 +60,6 @@ android {
dependencies {
implementation 'androidx.core:core-ktx:1.16.0'
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'androidx.games:games-activity:4.0.0'
implementation 'androidx.games:games-activity:1.2.1'
implementation 'com.google.android.material:material:1.12.0'
}

View file

@ -463,6 +463,9 @@ if(MSVC)
log_option_enabled("STATIC_LIBRARY")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
find_package(Vorbis REQUIRED)
if(ANDROID)
find_package(Vorbis CONFIG REQUIRED)
endif()
set_property(TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(VCPKG_TARGET_TRIPLET "x64-windows-static" CACHE STRING "")
else()
@ -550,6 +553,8 @@ elseif(ANDROID)
Threads::Threads
asio::asio
OpenSLES
Vorbis::vorbis
Vorbis::vorbisfile
LibLZMA::LibLZMA
game-activity::game-activity
GLESv3

View file

@ -1,9 +1,9 @@
#ifdef ANDROID
#include <game-activity/GameActivity.h>
#include <game-text-input/gametextinput.h>
#include <game-activity/GameActivity.cpp>
#include <game-text-input/gametextinput.cpp>
extern "C" {
#include <game-activity/native_app_glue/android_native_app_glue.h>
#include <game-activity/native_app_glue/android_native_app_glue.c>
}
#endif