Auto rotate on Android

I got this email from a user:

“Been playing Slay for years on and off, but just noticed that on my Pixel 5 the game ignores the system auto-rotate setting. I have it turned off but the game rotates anyway making it hard to play in bed. I’m sure this was fine the last time I played a while ago. I’m hoping this can be fixed to obey the system setting.”

If the device has auto-rotate switched off shouldn’t SDL handle that and not rotate our app? Or is that something we need to check for in our code?

Sorry, just bumping this question.

Does SDL respect the “Disable auto-rotate” setting on phones, or is this something we have to manually check for ourselves?

1 Like

Did you find a resolution to this? I’m running into the same issue with SDL2. I tried setting
android:screenOrientation="fullUser"
in the Android manifest file, but that has no effect.

SDL_GetDisplayOrientation() seems to ignore the OS orientation screen lock setting, and only report on the sensor-based orientation.

Sorry no, I never got a fix for this

OK, thanks for the follow up. If I happen to find a resolution, I’ll circle back here.

1 Like