From 7fe033f877c8b4872dc0e12f47a8edab3f37c8a6 Mon Sep 17 00:00:00 2001 From: Caerind Date: Sat, 13 Dec 2025 19:46:29 +0100 Subject: [PATCH 1/2] Fix Android define to standard __ANDROID__ is the standard define for Android platform. There is still the USE_JNI that is user-defined, so the code won't be enabled for people not want the feature on Android. --- imgui-SFML.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imgui-SFML.cpp b/imgui-SFML.cpp index 70c9b18..ce53371 100644 --- a/imgui-SFML.cpp +++ b/imgui-SFML.cpp @@ -27,7 +27,7 @@ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -#ifdef ANDROID +#ifdef __ANDROID__ #ifdef USE_JNI #include @@ -264,7 +264,7 @@ struct WindowContext std::optional mouseCursors[ImGuiMouseCursor_COUNT]; -#ifdef ANDROID +#ifdef __ANDROID__ #ifdef USE_JNI bool wantTextInput{false}; #endif @@ -534,7 +534,7 @@ void Update(const sf::Vector2i& mousePos, const sf::Vector2f& displaySize, sf::T } } -#ifdef ANDROID +#ifdef __ANDROID__ #ifdef USE_JNI if (io.WantTextInput && !s_currWindowCtx->wantTextInput) { From 0c74f967335b000a27a98614408bf20e20ca373d Mon Sep 17 00:00:00 2001 From: Caerind Date: Mon, 15 Dec 2025 10:30:30 +0100 Subject: [PATCH 2/2] Change Android preprocessor directive to SFML_SYSTEM_ANDROID --- imgui-SFML.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imgui-SFML.cpp b/imgui-SFML.cpp index ce53371..6ec9b43 100644 --- a/imgui-SFML.cpp +++ b/imgui-SFML.cpp @@ -27,7 +27,7 @@ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif -#ifdef __ANDROID__ +#ifdef SFML_SYSTEM_ANDROID #ifdef USE_JNI #include @@ -264,7 +264,7 @@ struct WindowContext std::optional mouseCursors[ImGuiMouseCursor_COUNT]; -#ifdef __ANDROID__ +#ifdef SFML_SYSTEM_ANDROID #ifdef USE_JNI bool wantTextInput{false}; #endif @@ -534,7 +534,7 @@ void Update(const sf::Vector2i& mousePos, const sf::Vector2f& displaySize, sf::T } } -#ifdef __ANDROID__ +#ifdef SFML_SYSTEM_ANDROID #ifdef USE_JNI if (io.WantTextInput && !s_currWindowCtx->wantTextInput) {