| Summary: | [KMSDRM] Windows with no matching video mode have wrong aspect ratio. Fix included. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Manuel Alfayate Corchete <redwindwanderer> |
| Component: | video | Assignee: | Manuel Alfayate Corchete <redwindwanderer> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.15 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Attachments: | Fix for FULLSCREEN windows so they look right even if no matching videomode is found. | ||
This patch looks good, commit approved.
In general please put else on the same line as the previous brace to match the rest of the SDL coding style.
e.g.
if ( true ) {
...
} else {
...
}
Thanks!
Also, when you commit this, please reference the bug number so we have historical data on why the change was made, along with any relevant discussion. Thanks! Ok, commit done. Closing this. Thanks! |
Created attachment 4673 [details] Fix for FULLSCREEN windows so they look right even if no matching videomode is found. Hi there, INTRO: In KMSDRM, SDL_WINDOW_FULLSCREEN windows are shown fullscreen by changing the videomode in the card connector, thus filling the screen to the area that permits their aspect ratio. (No, using PLANES for this is not an option because it breaks compatibility with a lot of hardware). SMALL PROBLEM: I noticed that games using SDL_WINDOW_FULLSCREEN windows with sizes not having an exact matching mode are shown with the wrong ratio because, until now, I was trying to select an exact resolution, instead of the closest one. THE SOLUTION: Select a close resolution, instead of an exactly matching one. That way, FULLSCREEN windows are shown as expected, even if they have absurd or obsolete resolutions not supported by the physical display. That is what this patch does. Please review so I can merge it. Thanks.