From 2f6b2897fe9d6a777b4f32ff6490436fbbb1b54b Mon Sep 17 00:00:00 2001 From: Alexandre Almeida Date: Thu, 26 Oct 2023 05:18:00 -0300 Subject: [PATCH] GetCurrentMonitor() - check window center instead of top-left corner (#3468) --- src/platforms/rcore_desktop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platforms/rcore_desktop.c b/src/platforms/rcore_desktop.c index b43a6b5ae..1114181a4 100644 --- a/src/platforms/rcore_desktop.c +++ b/src/platforms/rcore_desktop.c @@ -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++) {