You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Briefly describe the issue you are experiencing (or the feature you want to see added to raylib). Tell us what you were trying to do and what happened instead. Remember, this is not the best place to ask questions. For questions, go to raylib Discord server.
The reported values from GetScreenWidth() and GetScreenHeight() are incorrect after resizing the window. Prior to resizing the window you get the dimensions for before you apply DPI scaling. After a resize you get the actual pixel width after applying DPI scaling. This means to account for this you currently need to catch IsWindowResized() and latch the value and apply a scaling factor based on GetWindowScaleDPI() only if the window has been resized.
Environment
Provide your Platform, Operating System, OpenGL version, GPU details where you experienced the issue.
Windows 11, DPI 150%/1.5, default quickstart backend
Issue Screenshot
If possible, provide a screenshot that illustrates the issue. Usually an image is better than a thousand words.
Uhhh.... Idk if a screenshot would help much with this?
Code Example
Provide minimal reproduction code to test the issue. Please, format the code properly and try to keep it as simple as possible, just focusing on the experienced issue.
I made a fork here that shows the issue. Just run it and resize the window: https://github.com/NiamhNightglow/raylib-quickstart
The text was updated successfully, but these errors were encountered:
NiamhNightglow
changed the title
[module] Short description of the issue/bug/feature
[bug] Resizing the window breaks HIGHDPI scaling with values from GetScreenWidth() and GetScreenHeight()
Mar 12, 2025
WARNING: Please, read this note carefully before submitting a new issue:
It is important to realise that this is NOT A SUPPORT FORUM, this is for reproducible BUGS with raylib ONLY.
There are lots of generous and helpful people ready to help you out on raylib Discord forum or raylib reddit.
Remember that asking for support questions here actively takes developer time away from improving raylib.
Please, before submitting a new issue verify and check:
Issue description
Briefly describe the issue you are experiencing (or the feature you want to see added to raylib). Tell us what you were trying to do and what happened instead. Remember, this is not the best place to ask questions. For questions, go to raylib Discord server.
The reported values from GetScreenWidth() and GetScreenHeight() are incorrect after resizing the window. Prior to resizing the window you get the dimensions for before you apply DPI scaling. After a resize you get the actual pixel width after applying DPI scaling. This means to account for this you currently need to catch IsWindowResized() and latch the value and apply a scaling factor based on GetWindowScaleDPI() only if the window has been resized.
Environment
Provide your Platform, Operating System, OpenGL version, GPU details where you experienced the issue.
Windows 11, DPI 150%/1.5, default quickstart backend
Issue Screenshot
If possible, provide a screenshot that illustrates the issue. Usually an image is better than a thousand words.
Uhhh.... Idk if a screenshot would help much with this?
Code Example
Provide minimal reproduction code to test the issue. Please, format the code properly and try to keep it as simple as possible, just focusing on the experienced issue.
I made a fork here that shows the issue. Just run it and resize the window: https://github.com/NiamhNightglow/raylib-quickstart
The text was updated successfully, but these errors were encountered: