mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Remove use of deprecated ALooper_pollAll
This commit is contained in:
parent
2a4ca6e053
commit
a71b3a497b
@ -159,7 +159,8 @@ void InputImpl::setVirtualKeyboardVisible(bool visible)
|
||||
////////////////////////////////////////////////////////////
|
||||
bool InputImpl::isMouseButtonPressed(Mouse::Button button)
|
||||
{
|
||||
ALooper_pollAll(0, NULL, NULL, NULL);
|
||||
while (ALooper_pollOnce(0, NULL, NULL, NULL) >= 0)
|
||||
;
|
||||
|
||||
priv::ActivityStates& states = priv::getActivity();
|
||||
Lock lock(states.mutex);
|
||||
@ -171,7 +172,8 @@ bool InputImpl::isMouseButtonPressed(Mouse::Button button)
|
||||
////////////////////////////////////////////////////////////
|
||||
Vector2i InputImpl::getMousePosition()
|
||||
{
|
||||
ALooper_pollAll(0, NULL, NULL, NULL);
|
||||
while (ALooper_pollOnce(0, NULL, NULL, NULL) >= 0)
|
||||
;
|
||||
|
||||
priv::ActivityStates& states = priv::getActivity();
|
||||
Lock lock(states.mutex);
|
||||
@ -204,7 +206,8 @@ void InputImpl::setMousePosition(const Vector2i& position, const WindowBase& /*
|
||||
////////////////////////////////////////////////////////////
|
||||
bool InputImpl::isTouchDown(unsigned int finger)
|
||||
{
|
||||
ALooper_pollAll(0, NULL, NULL, NULL);
|
||||
while (ALooper_pollOnce(0, NULL, NULL, NULL) >= 0)
|
||||
;
|
||||
|
||||
priv::ActivityStates& states = priv::getActivity();
|
||||
Lock lock(states.mutex);
|
||||
@ -216,7 +219,8 @@ bool InputImpl::isTouchDown(unsigned int finger)
|
||||
////////////////////////////////////////////////////////////
|
||||
Vector2i InputImpl::getTouchPosition(unsigned int finger)
|
||||
{
|
||||
ALooper_pollAll(0, NULL, NULL, NULL);
|
||||
while (ALooper_pollOnce(0, NULL, NULL, NULL) >= 0)
|
||||
;
|
||||
|
||||
priv::ActivityStates& states = priv::getActivity();
|
||||
Lock lock(states.mutex);
|
||||
|
@ -123,7 +123,8 @@ void SensorImpl::close()
|
||||
Vector3f SensorImpl::update()
|
||||
{
|
||||
// Update our sensor data list
|
||||
ALooper_pollAll(0, NULL, NULL, NULL);
|
||||
while (ALooper_pollOnce(0, NULL, NULL, NULL) >= 0)
|
||||
;
|
||||
|
||||
return sensorData[m_index];
|
||||
}
|
||||
|
@ -102,7 +102,8 @@ WindowHandle WindowImplAndroid::getSystemHandle() const
|
||||
void WindowImplAndroid::processEvents()
|
||||
{
|
||||
// Process incoming OS events
|
||||
ALooper_pollAll(0, NULL, NULL, NULL);
|
||||
while (ALooper_pollOnce(0, NULL, NULL, NULL) >= 0)
|
||||
;
|
||||
|
||||
ActivityStates& states = getActivity();
|
||||
Lock lock(states.mutex);
|
||||
|
Loading…
Reference in New Issue
Block a user