love2d / love-android

Android build setup for LÖVE.
https://love2d.org
Other
211 stars 73 forks source link

Respect user preference for screen rotation #272

Closed snowkittykira closed 5 months ago

snowkittykira commented 6 months ago

Currently, a resizable love2d game will always use the sensor to determine orientation, even if the user has their phone pinned to vertical. This makes it hard to play a game lying on your side. This seems to be due to the way GameActivity.java requests screen orientation. The following change resolves the issue for me, allowing the app to rotate when allowed and preventing it from rotating when pinned.

https://github.com/exelix11/SysDVR/commit/81ffb43b4ee02f2b1b1926f1107df4213bb013d0

MikuAuahDark commented 6 months ago

Hmm, I think this change should be upstreamed to SDL first. I'll see if I can upstream the changes sometime.

snowkittykira commented 6 months ago

ok! there's a bug for it here which I replied to but hasn't gotten a response

https://github.com/libsdl-org/SDL/issues/6090

MikuAuahDark commented 5 months ago

libsdl-org/SDL#10046 has been merged, which means it's about cherry-picking the change to megasource. I'll close this when I'm done with it.

MikuAuahDark commented 5 months ago

Done on LOVE 12. If we plan on releasing 11.6 in the future, we'll surely update to SDL 2.30.4 (or later version) which contains the PR above.