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

iOS landscape orientation bugs with iOS 10.x and iPhone 6 #2318

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

iOS landscape orientation bugs with iOS 10.x and iPhone 6 #2318

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.5
Reported for operating system, platform: iOS (All), iPhone/iPod touch

Comments on the original bug report:

On 2016-12-02 21:39:44 +0000, philhassey wrote:

Created attachment 2644
You can see in this shot how the window is being created in a "portrait" size on a "landscape" screen.

If you create a landscape only app, the following steps will cause the screen size to break. This happens on iPhone 6's with iOS 10.x. It does not seem to impact iPads with iOS 10.x

  • Create your app using proper start up screens, orientation hints, full screen, resize disabled, border disabled.
  • Start your app
  • Hold your phone in landscape orientation
  • Put your phone into sleep mode
  • Hold your phone in portrait orientation
  • Unlock your phone to resume the app
  • You'll see the app window is re-created incorrectly

I did a lot of digging, and it seems that as of iOS 8 the recommended way to get the window size has changed again. When the app resumes, it makes a call to UIKit_ComputeViewFrame at some point which sometimes gives strange results using the current method. Sometimes the bounds are not what they are expected to be.

I've attached a new version of that function which resolved the issue for me, and I've given it some testing on both a "all orientations" game as well as a "landscape-only" game, on both iPads and an iPhone 6.

I'm not 100% certain if I've correctly handled all of the SDL or iOS specifics in my replacement function, so I'd appreciate any review / help in getting a finalized patch here.

I've also attached a screenshot showing what happens to my game in the above steps.

Thanks!
-Phil

On 2016-12-02 21:40:53 +0000, philhassey wrote:

Created attachment 2645
Patch / replacement for UIKit_ComputeViewFrame in SDL_uikitvideo.m

On 2017-04-15 14:10:33 +0000, dmuratshin wrote:

could be related with https://bugzilla.libsdl.org/show_bug.cgi?id=3465

On 2017-08-11 20:14:10 +0000, Sam Lantinga wrote:

Alex, can you look at this for the 2.0.6 release?

On 2017-08-19 02:25:07 +0000, Alex Szpakowski wrote:

I believe I've fixed it / worked around the problem with https://hg.libsdl.org/SDL/rev/770196e01af1 , can you confirm?

On 2017-09-29 16:43:25 +0000, philhassey wrote:

This seems to be fixed in 2.0.6. Thanks! Will report back if I hear otherwise from users.

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

No branches or pull requests

1 participant