mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-10 20:25:06 +01:00
Improve rotations logic
This commit is contained in:
parent
a68e2f1544
commit
d6723c6689
@ -422,8 +422,10 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
|
||||
private fun rotateScreen() {
|
||||
if (resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT) {
|
||||
(context as? EmulationActivity)?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
} else {
|
||||
} else if (resources.configuration.orientation == Configuration.ORIENTATION_LANDSPACE) {
|
||||
(context as? EmulationActivity)?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
} else {
|
||||
(context as? EmulationActivity)?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user