1. I'm using GDevelop (not sure if that matters, I could go bother them about this, but I think this issue is more on itch.io's side so I want to start here)
2. I want to make a game that can be played both in landscape and portrait orientations. (Landscape if someone uses a gaming handheld with a landscape aspect ratio, and portrait if someone wants to use their phone and have the controls below the game screen)
3. This works just fine but only at first. You press "Run game", it will launch, and be able adjust to whatever orientation you rotate your phone. (Of course, as long as I've used the appropriate options in the game page and GDevelop game settings, I choose "Default" for both instead of Landscape or Portrait, so that it can use both)
4. The issue appears if you press "back", or if you move to another tab or app, and then come back to continue playing the game. You will see itch.io's own button that says "Restore game" (instead of Run game). When you press this, it could be in the wrong orientation and refuse to change until you've refreshed the page and reloaded.
5. If for example I set the itch.io setting to Landscape, and I launch the game with my phone in Portrait, you can see that it launches in landscape and quickly changes to the phone's current orientation which in this case is portrait. But it seems after leaving the page and coming back, it forgets to do this again and the orientation stays locked. Hopefully this is a hint for what is wrong here.
6. I noticed that on mobile, this happens on Chrome and Edge, but not Firefox. (However, Firefox performs very poorly so I'd rather not use it)
7. I've provided a test game so no one has to go out of their way to do it just for this test. I tried to make this game perfectly square to see if I could work around the issue, but it seems itch.io still has preference over one or another orientation.
https://jrbnoname.itch.io/orientation-issue
Thank you!!