Fixes a bug where the Gyroscope and Accelerometer would not be re-enabled when the app regains focus or is resumed. (#13298)

This commit is contained in:
Aaron Ramirez 2021-11-29 07:53:13 -08:00 committed by GitHub
parent ef8a14a968
commit 97f3fca139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -374,11 +374,9 @@ static void android_input_poll_main_cmd(void)
{
bool boolean = false;
bool enable_accelerometer = (android_app->sensor_state_mask &
(UINT64_C(1) << RETRO_SENSOR_ACCELEROMETER_ENABLE)) &&
!android_app->accelerometerSensor;
(UINT64_C(1) << RETRO_SENSOR_ACCELEROMETER_DISABLE));
bool enable_gyroscope = (android_app->sensor_state_mask &
(UINT64_C(1) << RETRO_SENSOR_GYROSCOPE_ENABLE)) &&
!android_app->gyroscopeSensor;
(UINT64_C(1) << RETRO_SENSOR_GYROSCOPE_DISABLE));
retroarch_ctl(RARCH_CTL_SET_PAUSED, &boolean);
retroarch_ctl(RARCH_CTL_SET_IDLE, &boolean);