diff options
| author | Alexandre Almeida <[email protected]> | 2023-10-26 05:18:00 -0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-26 10:18:00 +0200 |
| commit | 2f6b2897fe9d6a777b4f32ff6490436fbbb1b54b (patch) | |
| tree | 29a22446e09ec9dc70d8c0f57a98a0670795cc68 /src/platforms | |
| parent | 9a687e3153633479067fbb0439a7e0214dec665b (diff) | |
| download | raylib-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.c | 2 |
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++) { |
