| Summary: | Problem with fullscreen modes when rotating a Windows 8 tablet by 90 degrees | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Elmar <elmar> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | leonardo.guilherme |
| Version: | 2.0.0 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 8 | ||
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