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

GetCurrentMonitor() - check window center instead of top-left corner #3468

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

M374LX
Copy link
Contributor

@M374LX M374LX commented Oct 25, 2023

Partial fix for #3456.

At present, in case the center of the window is out of any monitor, it detects the first one as current on the GLFW implementation, while SDL_GetWindowDisplayIndex() apparently detects the monitor that is the closest to the center of the window (https://github.com/libsdl-org/SDL/blob/b29128994e87d82eae4751d65ff38b935ce7d6a2/src/video/SDL_video.c#L1114).

Maybe we can merge this PR as is and leave the issue of the center of the window being out of any monitor to another one.

@raysan5 raysan5 merged commit 2f6b289 into raysan5:master Oct 26, 2023
@raysan5
Copy link
Owner

raysan5 commented Oct 26, 2023

@M374LX thanks for the review!

Maybe we can merge this PR as is and leave the issue of the center of the window being out of any monitor to another one.

Agree.

@M374LX M374LX deleted the getcurrentmonitor-center branch October 26, 2023 23:42
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.

None yet

2 participants