forked from libsdl-org/sdl2-compat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mode switching due to information loss when casting mode info
SDL3 verifies the requested mode parameters precisely, which can cause the mode switch can fail due to the float to int rounding when converting the SDL3 mode struct to the SDL2 version. Instead of casting directly, use the SDL2 mode parameters to try and find the closest SDL3 display mode. This fixes video mode switching for modes with refresh rates that are not precisely an integer, and allows for removing the DisplayMode_2to3 function entirely.
- Loading branch information
1 parent
a305041
commit b4e53d2
Showing
1 changed file
with
18 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters