Skip to content

Commit

Permalink
GetCurrentMonitor() - check window center instead of top-left corner (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
M374LX committed Oct 26, 2023
1 parent 9a687e3 commit 2f6b289
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platforms/rcore_desktop.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,8 @@ int GetCurrentMonitor(void)
int y = 0;

glfwGetWindowPos(platform.handle, &x, &y);
x += (int)CORE.Window.screen.width / 2;
y += (int)CORE.Window.screen.height / 2;

for (int i = 0; i < monitorCount; i++)
{
Expand Down

0 comments on commit 2f6b289

Please sign in to comment.