diff --git a/app/src/main/java/emu/skyline/EmulationActivity.kt b/app/src/main/java/emu/skyline/EmulationActivity.kt index bd98001e..0adc35ae 100644 --- a/app/src/main/java/emu/skyline/EmulationActivity.kt +++ b/app/src/main/java/emu/skyline/EmulationActivity.kt @@ -507,14 +507,21 @@ class EmulationActivity : AppCompatActivity(), SurfaceHolder.Callback, View.OnTo val displayMetrics = DisplayMetrics() windowManager.defaultDisplay.getMetrics(displayMetrics) binding.onScreenGameView.minimumHeight = displayMetrics.heightPixels - requestedOrientation = emulationSettings.orientation + requestedOrientation = + if (emulationSettings.orientation != ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED) { + emulationSettings.orientation + } else { + ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE + } for (displayFeature in newLayoutInfo.displayFeatures) { val foldFeature = displayFeature as? FoldingFeature foldFeature?.let { + //Folding feature separates the display area into two distinct sections if (it.isSeparating) { - //Folding feature separates the display area into two distinct sections - requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED - if (foldFeature.orientation == FoldingFeature.Orientation.HORIZONTAL) { + if (emulationSettings.orientation == ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED){ + requestedOrientation = emulationSettings.orientation + } + if (it.orientation == FoldingFeature.Orientation.HORIZONTAL) { binding.onScreenGameView.minimumHeight = displayFeature.bounds.top } } diff --git a/app/src/main/res/values/array.xml b/app/src/main/res/values/array.xml index 88ad6132..b7ee68ea 100644 --- a/app/src/main/res/values/array.xml +++ b/app/src/main/res/values/array.xml @@ -85,12 +85,14 @@ Device Aspect Ratio (Stretch to fit) + Landscape (auto) Auto Landscape Landscape (reverse) 6 + -1 0 8