Explorar o código

Merge pull request #71026 from bruvzg/fix_prim_detect

[Windows] Fix primary screen detection.
Rémi Verschelde %!s(int64=2) %!d(string=hai) anos
pai
achega
fcba87e696
Modificáronse 1 ficheiros con 3 adicións e 5 borrados
  1. 3 5
      platform/windows/display_server_windows.cpp

+ 3 - 5
platform/windows/display_server_windows.cpp

@@ -348,11 +348,9 @@ typedef struct {
 
 static BOOL CALLBACK _MonitorEnumProcPrim(HMONITOR hMonitor, HDC hdcMonitor, LPRECT lprcMonitor, LPARAM dwData) {
 	EnumScreenData *data = (EnumScreenData *)dwData;
-	if (data->monitor == hMonitor) {
-		if ((lprcMonitor->left == 0) && (lprcMonitor->top == 0)) {
-			data->screen = data->count;
-			return FALSE;
-		}
+	if ((lprcMonitor->left == 0) && (lprcMonitor->top == 0)) {
+		data->screen = data->count;
+		return FALSE;
 	}
 
 	data->count++;