Closed Leopard20 closed 6 years ago
setRequestedOrientation(SCREEN_ORIENTATION_SENSOR_LANDSCAPE); in android/src/org/ppsspp/ppsspp/NativeActivity.java should do it
@hrydgard Thank you for trying to implement this. But what I meant was Landscape Auto, which is an automatic switch between Landscape and Landscape Reverse, but right now the Auto option cycles through all possible orientations, including portrait and portrait reverse. Another limitation: The option doesn't work if Autorotation is turned off through phone settings.
Yeah I eventually understood that. Florin9doi has contributed what you want in https://github.com/hrydgard/ppsspp/pull/10751 , just waiting for him to make a change.
If autorotation is turned off, there's nothing I can do to override it.
Actually, I've seen plenty of games that work without autorotation on. I'm not sure how they do this though!
For example: GTA SA, Xash3D, Special Forces Group 2, etc.
That Xash3D I mentioned is actually open source, hosted on this very github. Maybe you could look at the source codes or ask the creator, a1batross.
Here's the link: https://github.com/FWGS/xash3d-android-project
But that seems completely pointless? Presumably, if the user has disabled autorotation in the OS, they don't want the screen to rotate.
You could be right. But personally I don't want my phone to change from Landscape to Portrait every time I make a ~50 degree rotation, which is inadvertent most of the time! But switching between Landscape and Landscape Reverse in games doesn't pose any inconveniences to me. Besides, it only reverses when I rotate the phone more than 90 degrees. That can't be inadvertent!
Also, since this new rotation option is called Landscape Auto, people who select it actually want their phone to rotate right?! 😉
Landscape Auto don't requires to enable autorotation. It works the same as the games mentioned.
@Florin9doi Thanks a lot!
By auto landscape I mean automatic switch between landscape and inverted landscape modes as you flip the device upside down.