You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm holding the Android device in portrait orientation and start my game which also supports portrait orientation, the screen rotates to landscape for a couple of seconds before rotating back to portrait.
Expected: Start the game in portrait orientation and stay in portrait orientation without rotating to landscape.
The text was updated successfully, but these errors were encountered:
The issue is that AndroidGameWindow.SetOrientation(DisplayOrientation newOrientation, ...) is initially called with newOrientation = DisplayOrientation.Default, which the method does not evaluate as a supported orientation and coerces into LandscapeLeft.
I resolved this issue by changing:
if ((supported & newOrientation) == 0)
to
if ((newOrientation != DisplayOrientation.Default) && (supported & newOrientation) == 0)
since DisplayOrientation.Default = 0 and doesn't otherwise pass the check for supporting any orientations.
Effectively, this makes DisplayOrientation.Default support any orientation instead of no orientations.
When I'm holding the Android device in portrait orientation and start my game which also supports portrait orientation, the screen rotates to landscape for a couple of seconds before rotating back to portrait.
Expected: Start the game in portrait orientation and stay in portrait orientation without rotating to landscape.
The text was updated successfully, but these errors were encountered: