News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Android build ignores screen auto-rotation lock

Started by ceeac, June 22, 2023, 08:17:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ceeac

Steps to reproduce on Android 11:
  • Install Simutrans beta from Play Store
  • Deselect screen auto-rotation from the pull-down menu
  • Start Simutrans
  • Tilt the device from portrait to landscape orientation or vice versa
  • Notice that the screen rotates despite auto-rotation being turned off

prissi

Not sure how to prevent this. I would think this is a SDL2 bug, since we get windowschange events from SDL and react accordingly.

It is an SDL2 bug: https://github.com/libsdl-org/SDL/issues/6090

Roboron

SDL released a new version last week that fix this

QuoteThis is a stable bugfix release, with the following changes:

- Android rotation will respect user rotation lock preferences

I have updated SDL for Android so we compile with the new version. So this should be fixed for the next release.

prissi

Great, that bug was in SDL2 since early 2023 and now they started on SDL3. So I was afraid they would never fix it and was ready to dig through the interface code.