summaryrefslogtreecommitdiff
path: root/platform/windows/os_windows.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-08-22 08:12:04 +0200
committerGitHub <noreply@github.com>2017-08-22 08:12:04 +0200
commit7f49e2a7a0e74b7de98c4cb176f333f78d6c0e50 (patch)
treecde824812428078fa0c258b6a9204c6186f6cec9 /platform/windows/os_windows.cpp
parent4fc0a2d776cc26a0b372af4c345ccc0f44e47105 (diff)
parent63f847b3065bb7c7a130a199731b4d92a7bdfb91 (diff)
Merge pull request #10487 from marcelofg55/curscr_as_default
p_screen param from get_screen_* funcs now default to the current screen
Diffstat (limited to 'platform/windows/os_windows.cpp')
-rw-r--r--platform/windows/os_windows.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index 2e908b82ab..db453a5f46 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -1384,7 +1384,7 @@ static BOOL CALLBACK _MonitorEnumProcPos(HMONITOR hMonitor, HDC hdcMonitor, LPRE
Point2 OS_Windows::get_screen_position(int p_screen) const {
- EnumPosData data = { 0, p_screen, Point2() };
+ EnumPosData data = { 0, p_screen == -1 ? get_current_screen() : p_screen, Point2() };
EnumDisplayMonitors(NULL, NULL, _MonitorEnumProcPos, (LPARAM)&data);
return data.pos;
}
@@ -1409,7 +1409,7 @@ static BOOL CALLBACK _MonitorEnumProcSize(HMONITOR hMonitor, HDC hdcMonitor, LPR
Size2 OS_Windows::get_screen_size(int p_screen) const {
- EnumSizeData data = { 0, p_screen, Size2() };
+ EnumSizeData data = { 0, p_screen == -1 ? get_current_screen() : p_screen, Size2() };
EnumDisplayMonitors(NULL, NULL, _MonitorEnumProcSize, (LPARAM)&data);
return data.size;
}
@@ -1433,7 +1433,7 @@ static BOOL CALLBACK _MonitorEnumProcDpi(HMONITOR hMonitor, HDC hdcMonitor, LPRE
int OS_Windows::get_screen_dpi(int p_screen) const {
- EnumDpiData data = { 0, p_screen, 72 };
+ EnumDpiData data = { 0, p_screen == -1 ? get_current_screen() : p_screen, 72 };
EnumDisplayMonitors(NULL, NULL, _MonitorEnumProcDpi, (LPARAM)&data);
return data.dpi;
}