1
0
mirror of https://github.com/libretro/RetroArch synced 2025-04-01 22:20:31 +00:00

(Android) First check if an event is in the event queue before

'getting' it
This commit is contained in:
twinaphex 2012-12-16 00:08:30 +01:00
parent 224eaab902
commit 7076685a1e

@ -283,7 +283,9 @@ static void android_input_poll(void *data)
// Process this event.
while(id >= 0)
{
if(id == LOOPER_ID_INPUT)
bool looper_input_do = id == LOOPER_ID_INPUT;
if(looper_input_do && AInputQueue_hasEvents(android_app->inputQueue))
{
AInputEvent* event = NULL;
AInputQueue_getEvent(android_app->inputQueue, &event);
@ -336,10 +338,9 @@ static void android_input_poll(void *data)
handled = 0;
}
}
AInputQueue_finishEvent(android_app->inputQueue, event, handled);
}
else
else if(!looper_input_do)
{
int8_t cmd;