summaryrefslogtreecommitdiffhomepage
path: root/src/platforms
diff options
context:
space:
mode:
authorAlexandre Almeida <[email protected]>2023-10-26 05:18:00 -0300
committerGitHub <[email protected]>2023-10-26 10:18:00 +0200
commit2f6b2897fe9d6a777b4f32ff6490436fbbb1b54b (patch)
tree29a22446e09ec9dc70d8c0f57a98a0670795cc68 /src/platforms
parent9a687e3153633479067fbb0439a7e0214dec665b (diff)
downloadraylib-2f6b2897fe9d6a777b4f32ff6490436fbbb1b54b.tar.gz
raylib-2f6b2897fe9d6a777b4f32ff6490436fbbb1b54b.zip
GetCurrentMonitor() - check window center instead of top-left corner (#3468)
Diffstat (limited to 'src/platforms')
-rw-r--r--src/platforms/rcore_desktop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/platforms/rcore_desktop.c b/src/platforms/rcore_desktop.c
index b43a6b5a..1114181a 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++)
{