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

Problem with fullscreen modes when rotating a Windows 8 tablet by 90 degrees #1061

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 3 comments
Assignees
Milestone

Comments

@SDLBugzilla
Copy link
Collaborator

SDLBugzilla commented Feb 10, 2021

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.0
Reported for operating system, platform: Windows 8, x86_64

Comments on the original bug report:

On 2013-09-01 14:11:55 +0000, Elmar wrote:

Hi,

if my app is running in fullscreen mode on a Windows 8 tablet, and the user rotates the tablet by 90 degrees, troubles start...

The good news is that a resize event arrives. If the normal fullscreen resolution is 1366x768, then the resize event usually reports 768x1366 (which is perfect), but not always, sometimes I get something broken like 768x1351 or so.

The bad news is that the function below doesn't get the new display modes after a 90 degree rotation, since it uses '!display->num_display_modes'.

SDL_GetNumDisplayModesForDisplay(SDL_VideoDisplay * display)
{
    if (!display->num_display_modes && _this->GetDisplayModes) {
        _this->GetDisplayModes(_this, display);
        SDL_qsort(display->display_modes, display->num_display_modes,
                  sizeof(SDL_DisplayMode), cmpmodes);
    }
    return display->num_display_modes;

I fear the SDL code can currently not handle resolutions that change at app runtime..

Best regards,
Elmar

@icculus
Copy link
Collaborator

icculus commented Aug 10, 2021

My suspicion is we have fixed this since 2013; going to close for now.

@icculus icculus closed this as completed Aug 10, 2021
@icculus
Copy link
Collaborator

icculus commented Aug 10, 2021

Actually, wait, we can handle orientation changes, but I'm pretty sure we can't handle dynamic display resolution changes. Putting this in 2.0.18 for consideration (but possibly it gets kicked to a later milestone).

@icculus icculus reopened this Aug 10, 2021
@icculus icculus added this to the 2.0.18 milestone Aug 10, 2021
@slouken slouken self-assigned this Nov 8, 2021
@slouken
Copy link
Collaborator

slouken commented Nov 10, 2021

I added the dynamic orientation change event on Windows and set up the infrastructure for a resolution change event, if we want to add one.

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

3 participants