diff --git a/CMakeLists.txt b/CMakeLists.txt index aff024cf..de8728f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -201,9 +201,7 @@ target_include_directories(boost SYSTEM INTERFACE ${Boost_INCLUDE_DIR}) if(ANDROID) set(CRYPTOPP_OPT_DISABLE_ASM ON CACHE BOOL "" FORCE) - if(NOT BUILD_LIBRETRO_CORE) - target_sources(AlberCore PRIVATE src/jni_driver.cpp) - endif() + target_sources(AlberCore PRIVATE src/jni_driver.cpp) target_link_libraries(AlberCore PRIVATE EGL log) endif() diff --git a/src/jni_driver.cpp b/src/jni_driver.cpp index 6a156360..7274c9c4 100644 --- a/src/jni_driver.cpp +++ b/src/jni_driver.cpp @@ -10,11 +10,11 @@ #include "android_utils.hpp" #include "sdl_sensors.hpp" -std::unique_ptr emulator = nullptr; -HIDService* hidService = nullptr; -RendererGL* renderer = nullptr; -bool romLoaded = false; -JavaVM* jvm = nullptr; +static std::unique_ptr emulator = nullptr; +static HIDService* hidService = nullptr; +static RendererGL* renderer = nullptr; +static bool romLoaded = false; +static JavaVM* jvm = nullptr; jclass alberClass; jmethodID alberClassOpenDocument; diff --git a/src/libretro_core.cpp b/src/libretro_core.cpp index aca8330d..b44687b2 100644 --- a/src/libretro_core.cpp +++ b/src/libretro_core.cpp @@ -19,8 +19,8 @@ static std::filesystem::path savePath; static bool screenTouched = false; static bool usingGLES = false; -std::unique_ptr emulator; -RendererGL* renderer; +static std::unique_ptr emulator; +static RendererGL* renderer; std::filesystem::path Emulator::getConfigPath() { return std::filesystem::path(savePath / "config.toml"); } std::filesystem::path Emulator::getAppDataRoot() { return std::filesystem::path(savePath / "Emulator Files"); }