mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
[Android] Fixed WindowHandle and getSystemHandle()
This commit is contained in:
parent
77567e9656
commit
4626e95491
@ -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
|
||||
|
@ -61,7 +61,10 @@ WindowImplAndroid::~WindowImplAndroid()
|
||||
////////////////////////////////////////////////////////////
|
||||
WindowHandle WindowImplAndroid::getSystemHandle() const
|
||||
{
|
||||
return NULL;
|
||||
ActivityStates* states = getActivity(NULL);
|
||||
sf::Lock lock(states->mutex);
|
||||
|
||||
return states->window;
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,10 +30,6 @@
|
||||
#include <SFML/Window/WindowImpl.hpp>
|
||||
#include <SFML/System/Sleep.hpp>
|
||||
#include <SFML/System/Err.hpp>
|
||||
#ifdef SFML_SYSTEM_ANDROID
|
||||
#include <SFML/Window/Android/WindowImplAndroid.hpp>
|
||||
#include <SFML/Window/Android/EglContext.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
namespace
|
||||
|
Loading…
Reference in New Issue
Block a user