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

[patch] Screen size incorrect when changing orientations and resuming #1582

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

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.3
Reported for operating system, platform: iOS (All), iPhone/iPod touch

Comments on the original bug report:

On 2014-07-24 16:49:30 +0000, philhassey wrote:

Steps to Reproduce:

  1. Using iOS - with orientation lock off
  2. Window created with SDL_WINDOW_RESIZABLE
  3. Hold device in Landscape orientation
  4. Start App
  5. Rotate device to Portrait orientation
  6. Press Home button
  7. Resume the App

Result:
Screen is in correct portrait orientation, but the screen size is the landscape size (so a large chunk of the screen isn't being displayed.)

Expected:
Screen size should be correct given the orientation.

Workaround:
Rotate the device a couple times to resolve the issue.

Notes:
I tried mucking about in UIKit_IsDisplayLandscape to fix this, and did some stuff like changed it to return UIDeviceOrientationIsLandscape([[UIDevice currentDevice] orientation]); Sometimes this seemed to help, but it didn't seem to fix the problem all the time. Mixing it in locking and unlocking the orientation also seems to impact when this happens.

On 2014-07-29 09:40:09 +0000, Sylvain wrote:

Just wondering could this be same as this bug I got from Apple a while ago:

https://bugzilla.libsdl.org/show_bug.cgi?id=2248

(if so, mark mine as duplicate as I there is not method to reproduce it).

On 2014-07-31 02:45:49 +0000, philhassey wrote:

I tracked down the bug and have created a patch.

The function "SDL_SetWindowSize" was not being called during viewDidLayoutSubviews, so when the app was restored, SDL send out an incorrect SDL_WINDOWEVENT_RESIZED in SDL_UpdateFullscreenMode.

This one line patch corrects this bug.

-Phil

On 2014-07-31 02:46:48 +0000, philhassey wrote:

Created attachment 1799
patch for this bug

On 2015-02-19 06:32:15 +0000, Ryan C. Gordon wrote:

Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry
if you got a lot of email from this. This is to help me sort through some bugs
in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4,
though!

On 2015-04-10 02:45:40 +0000, Ryan C. Gordon wrote:

This bug should be fixed by the changes made for Bug # 2798. Please reopen if that's not the case.

Thanks!

--ryan.

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