diff --git a/include/SFML/Window/WindowHandle.hpp b/include/SFML/Window/WindowHandle.hpp index 12e17018b..b7c67a5b4 100644 --- a/include/SFML/Window/WindowHandle.hpp +++ b/include/SFML/Window/WindowHandle.hpp @@ -63,7 +63,7 @@ namespace sf #elif defined(SFML_SYSTEM_ANDROID) - // Window handle doesn't exist on Android + // Window handle is ANativeWindow (void*) on Android typedef void* WindowHandle; #endif diff --git a/src/SFML/Window/Android/WindowImplAndroid.cpp b/src/SFML/Window/Android/WindowImplAndroid.cpp index ca2f9342b..cb34b06c9 100644 --- a/src/SFML/Window/Android/WindowImplAndroid.cpp +++ b/src/SFML/Window/Android/WindowImplAndroid.cpp @@ -61,7 +61,10 @@ WindowImplAndroid::~WindowImplAndroid() //////////////////////////////////////////////////////////// WindowHandle WindowImplAndroid::getSystemHandle() const { - return NULL; + ActivityStates* states = getActivity(NULL); + sf::Lock lock(states->mutex); + + return states->window; } diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index 939dd3f3e..6fd7cb6b3 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -30,10 +30,6 @@ #include #include #include -#ifdef SFML_SYSTEM_ANDROID - #include - #include -#endif namespace