-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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] Fullscreen toggling and resolution #3390
Comments
I have the same issue and I am using pretty much the same workaround. (windows & macOS) So basically the window size should be updated correctly when entering fullscreen. |
Just reviewed this issue and it worked as expected for me on Windows 10 x64, compiling with GCC and MSVC. When calling The only issue I detected is when exiting the full-screen mode calling |
Issue description
A program using raylib might run in both windowed and fullscreen mode. For example, the window size might be 800x600 in windowed mode but the program might want use the current monitor resolution when in fullscreen.
This does not work, however:
The reason is because
SetWindowSize()
simply callsglfwSetWindowSize()
without updatingCORE.Window.screen.width
andCORE.Window.screen.height
. This causesToggleFulscreen()
to actually use the previous window size.This is a possible workaround:
The examples above show how to toggle from windowed mode to fullscreen. When doing the opposite (changing to windowed mode), this also does not work:
Environment
Linux
Code Example
The same code examples given in #3382 (comment) apply to this issue.
The text was updated successfully, but these errors were encountered: