From f346949989965ef0242f128360b881845c38777d Mon Sep 17 00:00:00 2001 From: James Forward <33285502+jamfor352@users.noreply.github.com> Date: Fri, 12 Jan 2024 18:28:10 +0000 Subject: [PATCH] fix(android): Fix issue where motion controls were being locked incorrectly due to mismatch of initialised swap screen code. (#7344) --- .../org/citra/citra_emu/activities/EmulationActivity.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/android/app/src/main/java/org/citra/citra_emu/activities/EmulationActivity.kt b/src/android/app/src/main/java/org/citra/citra_emu/activities/EmulationActivity.kt index 10b17a0674..a911b0c317 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/activities/EmulationActivity.kt +++ b/src/android/app/src/main/java/org/citra/citra_emu/activities/EmulationActivity.kt @@ -40,6 +40,7 @@ import org.citra.citra_emu.utils.ControllerMappingHelper import org.citra.citra_emu.utils.FileBrowserHelper import org.citra.citra_emu.utils.ForegroundService import org.citra.citra_emu.utils.EmulationLifecycleUtil +import org.citra.citra_emu.utils.EmulationMenuSettings import org.citra.citra_emu.utils.ThemeUtil import org.citra.citra_emu.viewmodel.EmulationViewModel @@ -78,6 +79,12 @@ class EmulationActivity : AppCompatActivity() { // Set these options now so that the SurfaceView the game renders into is the right size. enableFullscreenImmersive() + // Override Citra core INI with the one set by our in game menu + NativeLibrary.swapScreens( + EmulationMenuSettings.swapScreens, + windowManager.defaultDisplay.rotation + ) + // Start a foreground service to prevent the app from getting killed in the background foregroundService = Intent(this, ForegroundService::class.java) startForegroundService(foregroundService)