[core] Complement implementations for SDL
(2)
#3447
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Adds a note (R832-R833), todo (R834) and small tweaks (R830, R837) to
GetWindowScaleDPI
.Note:
SDL_GetWindowDisplayScale
was only added onSDL3
(see doc).Todo: It will be necessary to implement the window scale factor calculation manually.
Complement
ToggleFullscreen
to matchrcore_desktop.c
's more closely (R226-R228, R230-R243).Change
ToggleBorderlessWindowed
to useSDL_WINDOW_FULLSCREEN_DESKTOP
that's supported directly bySDL
(R249-R251, R253, R255-R261, R264).Complement
SetWindowState
just to be a bit safer by setting the CORE fullscreen var and requiring a monitor for fullscreen (R298-R305). And enter fullscreen desktop from inside it (R357-R363).Complement
ClearWindowState
just to clear the CORE fullscreen var (R388). And leave fullscreen desktop from inside it (R439).Notes
ToggleBorderlessWindowed
the same asrcore_desktop.c
's.SDL_WINDOW_FULLSCREEN_DESKTOP
does work as expected onSDL
. I was still thinking on theGLFW
limitations. My apologies for giving you all that trouble. I'm really sorry, my bad.Environment
Changes tested on Linux (Mint 21.1 64-bit) with two monitors (14'' 1600x900 60Hz, 17'' 1280x1024 75Hz).
Edits
1: added line marks.
2, 3, 4: update.