Skip to content

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.

2 participants