(Android) Set g_runloop.is_idle to conserve on CPU usage while

idle
This commit is contained in:
twinaphex 2015-03-09 01:59:01 +01:00
parent f4c57d11d9
commit f87f3596ef

View File

@ -96,6 +96,7 @@ void engine_handle_cmd(void *data)
{ {
RARCH_LOG("Pausing RetroArch.\n"); RARCH_LOG("Pausing RetroArch.\n");
g_runloop.is_paused = true; g_runloop.is_paused = true;
g_runloop.is_idle = true;
} }
break; break;
@ -125,6 +126,7 @@ void engine_handle_cmd(void *data)
case APP_CMD_GAINED_FOCUS: case APP_CMD_GAINED_FOCUS:
g_runloop.is_paused = false; g_runloop.is_paused = false;
g_runloop.is_idle = false;
if ((android_app->sensor_state_mask if ((android_app->sensor_state_mask
& (1ULL << RETRO_SENSOR_ACCELEROMETER_ENABLE)) & (1ULL << RETRO_SENSOR_ACCELEROMETER_ENABLE))