From 40436cd70d14b4668e8dd1176681f29cc9d5038e Mon Sep 17 00:00:00 2001 From: hamyyy Date: Sat, 13 May 2023 17:27:33 +1000 Subject: [PATCH 1/2] GetCurrentMonitor() bugfix --- .vscode/settings.json | 3 +++ src/rcore.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000000..dde7088a363e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "workbench.colorTheme": "Abyss" +} \ No newline at end of file diff --git a/src/rcore.c b/src/rcore.c index 476ea8e2fbad..b4128585e0f9 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -1785,7 +1785,7 @@ int GetCurrentMonitor(void) monitor = monitors[i]; glfwGetMonitorWorkarea(monitor, &mx, &my, &width, &height); - if (x >= mx && x <= (mx + width) && y >= my && y <= (my + height)) + if (x >= mx && x <= (mx + width) && y > my && y < (my + height)) { index = i; break; From 7874171add57522e6d304b519c4e5edbc1a026c1 Mon Sep 17 00:00:00 2001 From: hamyyy Date: Sat, 13 May 2023 17:29:40 +1000 Subject: [PATCH 2/2] GetCurrentMonitor() bugfix --- .vscode/settings.json | 3 --- src/rcore.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index dde7088a363e..000000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "workbench.colorTheme": "Abyss" -} \ No newline at end of file diff --git a/src/rcore.c b/src/rcore.c index b4128585e0f9..881739c73968 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -1785,7 +1785,7 @@ int GetCurrentMonitor(void) monitor = monitors[i]; glfwGetMonitorWorkarea(monitor, &mx, &my, &width, &height); - if (x >= mx && x <= (mx + width) && y > my && y < (my + height)) + if (x >= mx && x < (mx + width) && y >= my && y < (my + height)) { index = i; break;