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

[platform_desktop] fixed issue with GetScreenWidth/GetScreenHeight #4074

Merged
merged 1 commit into from
Jun 17, 2024
Merged

[platform_desktop] fixed issue with GetScreenWidth/GetScreenHeight #4074

merged 1 commit into from
Jun 17, 2024

Conversation

CrackedPixel
Copy link
Contributor

@CrackedPixel CrackedPixel commented Jun 17, 2024

There is a known issue that people are having where GetScreenWidth/GetScreenHeight are returning incorrect values. It only uses the one set during initialization and does not work if you change the screen size. I believe this section of code is missing, and I copied the format from SetWindowMaxSize directly above it

PLATFORM_DEKSTOP_SDL does the same thing: https://github.com/raysan5/raylib/blob/master/src/platforms/rcore_desktop_sdl.c#L661

Note: I don't know about CORE.Window.render.width/height or where that one should be added (definitely a separate PR) but it has the same problem and i believe same solution

#3763
#3764

@raysan5 raysan5 merged commit 52f2a10 into raysan5:master Jun 17, 2024
@raysan5
Copy link
Owner

raysan5 commented Jun 17, 2024

@CrackedPixel thanks for the review. At first sight it seems logical, wondering why those lines were not there... 🤔

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.

2 participants