mirror of
https://github.com/libretro/RetroArch
synced 2025-03-12 22:14:30 +00:00
(Android) Slight nit
This commit is contained in:
parent
3ec51cbd23
commit
6d44198f8a
@ -54,7 +54,7 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd)
|
|||||||
break;
|
break;
|
||||||
case APP_CMD_GAINED_FOCUS:
|
case APP_CMD_GAINED_FOCUS:
|
||||||
// When our app gains focus, we start monitoring the accelerometer.
|
// When our app gains focus, we start monitoring the accelerometer.
|
||||||
/*
|
#if 0
|
||||||
if (g_android.accelerometerSensor != NULL)
|
if (g_android.accelerometerSensor != NULL)
|
||||||
{
|
{
|
||||||
ASensorEventQueue_enableSensor(g_android.sensorEventQueue,
|
ASensorEventQueue_enableSensor(g_android.sensorEventQueue,
|
||||||
@ -64,18 +64,18 @@ static void engine_handle_cmd(struct android_app* app, int32_t cmd)
|
|||||||
ASensorEventQueue_setEventRate(g_android.sensorEventQueue,
|
ASensorEventQueue_setEventRate(g_android.sensorEventQueue,
|
||||||
g_android.accelerometerSensor, (1000L/60)*1000);
|
g_android.accelerometerSensor, (1000L/60)*1000);
|
||||||
}
|
}
|
||||||
*/
|
#endif
|
||||||
break;
|
break;
|
||||||
case APP_CMD_LOST_FOCUS:
|
case APP_CMD_LOST_FOCUS:
|
||||||
// When our app loses focus, we stop monitoring the accelerometer.
|
// When our app loses focus, we stop monitoring the accelerometer.
|
||||||
// This is to avoid consuming battery while not being used.
|
// This is to avoid consuming battery while not being used.
|
||||||
if (!g_android.window_inited)
|
if (!g_android.window_inited)
|
||||||
{
|
{
|
||||||
/*
|
#if 0
|
||||||
if (g_android.accelerometerSensor != NULL)
|
if (g_android.accelerometerSensor != NULL)
|
||||||
ASensorEventQueue_disableSensor(g_android.sensorEventQueue,
|
ASensorEventQueue_disableSensor(g_android.sensorEventQueue,
|
||||||
g_android.accelerometerSensor);
|
g_android.accelerometerSensor);
|
||||||
*/
|
#endif
|
||||||
|
|
||||||
// Also stop animating.
|
// Also stop animating.
|
||||||
g_android.animating = 0;
|
g_android.animating = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user