浏览代码

Fixed order of operations in iconify test.

Camilla Berglund 13 年之前
父节点
当前提交
73ca3bdbb6
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      tests/iconify.c

+ 6 - 6
tests/iconify.c

@@ -95,6 +95,12 @@ int main(int argc, char** argv)
     GLFWmonitor monitor = NULL;
     GLFWmonitor monitor = NULL;
     GLFWwindow window;
     GLFWwindow window;
 
 
+    if (!glfwInit())
+    {
+        fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
+        exit(EXIT_FAILURE);
+    }
+
     while ((ch = getopt(argc, argv, "fh")) != -1)
     while ((ch = getopt(argc, argv, "fh")) != -1)
     {
     {
         switch (ch)
         switch (ch)
@@ -113,12 +119,6 @@ int main(int argc, char** argv)
         }
         }
     }
     }
 
 
-    if (!glfwInit())
-    {
-        fprintf(stderr, "Failed to initialize GLFW: %s\n", glfwErrorString(glfwGetError()));
-        exit(EXIT_FAILURE);
-    }
-
     if (monitor)
     if (monitor)
     {
     {
         GLFWvidmode mode;
         GLFWvidmode mode;