Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Complement implementations for SDL (2) #3447

Merged
merged 3 commits into from Oct 21, 2023
Merged

[core] Complement implementations for SDL (2) #3447

merged 3 commits into from Oct 21, 2023

Conversation

ghost
Copy link

@ghost ghost commented Oct 20, 2023

Changes

  1. Adds a note (R832-R833), todo (R834) and small tweaks (R830, R837) to GetWindowScaleDPI.
    Note: SDL_GetWindowDisplayScale was only added on SDL3 (see doc).
    Todo: It will be necessary to implement the window scale factor calculation manually.

  2. Complement ToggleFullscreento match rcore_desktop.c's more closely (R226-R228, R230-R243).

  3. Change ToggleBorderlessWindowed to use SDL_WINDOW_FULLSCREEN_DESKTOP that's supported directly by SDL (R249-R251, R253, R255-R261, R264).

  4. 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).

  5. Complement ClearWindowState just to clear the CORE fullscreen var (R388). And leave fullscreen desktop from inside it (R439).

Notes

  • @Bigfoot71 I'm so sorry for asking you to implement ToggleBorderlessWindowed the same as rcore_desktop.c's. SDL_WINDOW_FULLSCREEN_DESKTOP does work as expected on SDL. I was still thinking on the GLFW 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.

@ghost
Copy link
Author

ghost commented Oct 21, 2023

@raysan5 I think this is ready for merge. 👍

@raysan5 raysan5 merged commit e5993c4 into raysan5:master Oct 21, 2023
12 checks passed
@raysan5
Copy link
Owner

raysan5 commented Oct 21, 2023

@ubkp thank you very much for all the reviews!

@ghost ghost deleted the fix/implementations branch October 21, 2023 11:04
keithstellyes pushed a commit to keithstellyes/raylib that referenced this pull request Oct 21, 2023
* Add note and todo to GetWindowScaleDPI

* Complement ToggleFullscreen and change ToggleBorderlessWindowed

* Complement SetWindowState and ClearWindowState
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant