mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 21:35:25 +00:00
(Android) Solves ANR issues on Xperia Play after 30 secs
This commit is contained in:
parent
0c87437ea3
commit
857609b739
@ -89,26 +89,29 @@ static void android_input_poll(void *data)
|
||||
bool debug_enable = g_settings.input.debug_enable;
|
||||
struct android_app* android_app = (struct android_app*)g_android;
|
||||
uint64_t *lifecycle_state = &g_extern.lifecycle_state;
|
||||
AInputEvent* event = NULL;
|
||||
|
||||
*lifecycle_state &= ~((1ULL << RARCH_RESET) | (1ULL << RARCH_REWIND) | (1ULL << RARCH_FAST_FORWARD_KEY) | (1ULL << RARCH_FAST_FORWARD_HOLD_KEY) | (1ULL << RARCH_MUTE) | (1ULL << RARCH_SAVE_STATE_KEY) | (1ULL << RARCH_LOAD_STATE_KEY) | (1ULL << RARCH_STATE_SLOT_PLUS) | (1ULL << RARCH_STATE_SLOT_MINUS));
|
||||
|
||||
// Read all pending events.
|
||||
while (AInputQueue_hasEvents(android_app->inputQueue))
|
||||
{
|
||||
if (AInputQueue_getEvent(android_app->inputQueue, &event) >= 0)
|
||||
while (AInputQueue_hasEvents(android_app->inputQueue) > 0)
|
||||
{
|
||||
AInputEvent* event = NULL;
|
||||
|
||||
if (AInputQueue_getEvent(android_app->inputQueue, &event) < 0)
|
||||
break;
|
||||
|
||||
bool long_msg_enable = false;
|
||||
int32_t handled = 1;
|
||||
int action = 0;
|
||||
char msg[128];
|
||||
int source, id, predispatched, keycode, type_event, state_id;
|
||||
int source, id, keycode, type_event, state_id;
|
||||
//int predispatched;
|
||||
|
||||
msg[0] = 0;
|
||||
predispatched =AInputQueue_preDispatchEvent(android_app->inputQueue,event);
|
||||
//predispatched =AInputQueue_preDispatchEvent(android_app->inputQueue,event);
|
||||
|
||||
if (predispatched)
|
||||
continue;
|
||||
//if (predispatched)
|
||||
//continue;
|
||||
|
||||
source = AInputEvent_getSource(event);
|
||||
id = AInputEvent_getDeviceId(event);
|
||||
@ -255,7 +258,6 @@ static void android_input_poll(void *data)
|
||||
|
||||
AInputQueue_finishEvent(android_app->inputQueue, event, handled);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user