We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2079 - Problem with fullscreen modes when rotating a Windows 8 tablet by 90 degrees
Summary: Problem with fullscreen modes when rotating a Windows 8 tablet by 90 degrees
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.0
Hardware: x86_64 Windows 8
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-01 14:11 UTC by Elmar
Modified: 2017-08-15 06:53 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elmar 2013-09-01 14:11:55 UTC
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