浏览代码

Moved mode setting to after window re-creation.

Camilla Berglund 12 年之前
父节点
当前提交
aaa955f51f
共有 1 个文件被更改,包括 3 次插入6 次删除
  1. 3 6
      src/win32_window.c

+ 3 - 6
src/win32_window.c

@@ -862,12 +862,6 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
             return GL_FALSE;
     }
 
-    if (window->monitor)
-    {
-        if (!_glfwSetVideoMode(window->monitor, &window->videoMode))
-            return GL_FALSE;
-    }
-
     if (!createWindow(window, wndconfig, fbconfig))
         return GL_FALSE;
 
@@ -909,6 +903,9 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
 
     if (window->monitor)
     {
+        if (!_glfwSetVideoMode(window->monitor, &window->videoMode))
+            return GL_FALSE;
+
         // Place the window above all topmost windows
         _glfwPlatformShowWindow(window);
         SetWindowPos(window->win32.handle, HWND_TOPMOST, 0,0,0,0,