(Android) Input - Don't call AInputQueue_hasEvents on first iteration - it can return 0 even if events are queued up - leading to congestion issues

This commit is contained in:
twinaphex 2013-11-18 01:20:28 +01:00
parent 0c5f375d8c
commit 56a2b03e21

View File

@ -1726,7 +1726,7 @@ static void android_input_poll(void *data)
AInputEvent* event = NULL;
// Read all pending events.
while (AInputQueue_hasEvents(android_app->inputQueue))
do
{
//int processed = 0;
while (AInputQueue_getEvent(android_app->inputQueue, &event) >= 0)
@ -1922,7 +1922,7 @@ static void android_input_poll(void *data)
if (processed == 0)
RARCH_WARN("Failure reading next input event: %s\n", strerror(errno));
#endif
}
}while (AInputQueue_hasEvents(android_app->inputQueue));
}
else if (ident == LOOPER_ID_USER)
{