mirror of
https://github.com/bryanthaboi/gen1recomp
synced 2026-10-02 15:50:39 -04:00
cd33858020
The manifest asks for android:screenOrientation="fullUser", but SDL overrides it at window creation: SDLActivity.setOrientationBis, given a resizable window and no SDL_HINT_ORIENTATIONS -- which is what conf.lua produces on Android -- requests SCREEN_ORIENTATION_FULL_SENSOR. The *_SENSOR constants follow the accelerometer even when the player has turned auto-rotate off, so the game rotated anyway on a locked device. Override setOrientationBis in GameActivity to remap SDL's request onto the matching *_USER constant after super has run. The same orientations stay allowed and SDL keeps deciding which ones those are; only the tie-break changes, from the sensor to the system rotation setting.