Browse Source

Update win32Window.cpp

Anis 10 years ago
parent
commit
3495bd56ca
1 changed files with 13 additions and 0 deletions
  1. 13 0
      Engine/source/windowManager/win32/win32Window.cpp

+ 13 - 0
Engine/source/windowManager/win32/win32Window.cpp

@@ -64,6 +64,19 @@ static bool isScreenSaverRunning()
 	return sreensaver;
 	return sreensaver;
 }
 }
 
 
+DISPLAY_DEVICE GetPrimaryDevice()
+{
+	int index = 0;
+	DISPLAY_DEVICE dd;
+	dd.cb = sizeof(DISPLAY_DEVICE);
+
+	while (EnumDisplayDevices(NULL, index++, &dd, 0))
+	{
+		if (dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE) return dd;
+	}
+	return dd;
+}
+
 Win32Window::Win32Window(): mMouseLockPosition(0,0),
 Win32Window::Win32Window(): mMouseLockPosition(0,0),
 mShouldLockMouse(false),
 mShouldLockMouse(false),
 mMouseLocked(false),
 mMouseLocked(false),