Skip to content
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

Merged
merged 1 commit into from
Apr 9, 2014
Merged

Fix for wrong auto rotation on iOS #2250

merged 1 commit into from
Apr 9, 2014

Conversation

mrhelmut
Copy link
Contributor

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

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
@mgbot
Copy link
Member

mgbot commented Feb 27, 2014

Can one of the admins verify this patch?

1 similar comment
@mgbot
Copy link
Member

mgbot commented Feb 27, 2014

Can one of the admins verify this patch?

@tomspilman
Copy link
Member

@mgbot test

@mgbot
Copy link
Member

mgbot commented Feb 27, 2014

Test PASSed.
Refer to this link for build results: http://build.monogame.net/job/PullRequestTester/594/

@totallyeviljake
Copy link
Contributor

@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 ...

@tomspilman
Copy link
Member

I asked @RayBatts about this and he felt it made sense. He did a similar fix in another area before.

@Nezz
Copy link
Member

Nezz commented Mar 6, 2014

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.

@Nezz
Copy link
Member

Nezz commented Mar 8, 2014

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.

@Nezz
Copy link
Member

Nezz commented Apr 9, 2014

@tomspilman Can you please merge this? :)

KonajuGames added a commit that referenced this pull request Apr 9, 2014
Fix for wrong auto rotation on iOS
@KonajuGames KonajuGames merged commit 713019e into MonoGame:develop Apr 9, 2014
@KonajuGames
Copy link
Contributor

Done.

@Nezz
Copy link
Member

Nezz commented Apr 9, 2014

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants