-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for wrong auto rotation on iOS #2250
Conversation
iOS has inverted LanscapeLeft and LandscapeRight orientation compared to XNA. While other methods take that in account, it was missing in ToUIInterfaceOrientationMask, which was a potential source of unwanted auto rotation and crashes if the rotation resulted in unsupported Info.plist orientations. See codeplex discussion for details: https://monogame.codeplex.com/discussions/535677
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
@mgbot test |
Test PASSed. |
@Nezz was the original author of the orientation changes on ios way back last year. We've released updated games since then that were set to landscape left, but no autorotation. Adam, can you verify this change? I think John Peppers was also on that conversation ... |
I asked @RayBatts about this and he felt it made sense. He did a similar fix in another area before. |
We've never made a difference between landscape left and right, but we have used game center and it popped up the right way. I will have a look at this over the weekend. |
I have vertified this fix. It only affects edge cases like the one that was described as everywhere else landscape left and right are swapped correctly. The PR can be merged. |
@tomspilman Can you please merge this? :) |
Fix for wrong auto rotation on iOS
Done. |
Thanks :) |
iOS has inverted LanscapeLeft and LandscapeRight orientation compared to XNA.
While other methods take that in account, it was missing in ToUIInterfaceOrientationMask, which was a potential source of unwanted auto rotation (overriding SupportedOrientations) and crashes if the rotation resulted in unsupported Info.plist orientations.
See codeplex discussion for details: https://monogame.codeplex.com/discussions/535677