1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 20:28:49 -05:00

Fixed invalid order of operations.

This commit is contained in:
Camilla Berglund 2013-01-02 00:50:57 +01:00
parent 4305c76049
commit 45459d5a34

View File

@ -100,6 +100,11 @@ int main(int argc, char** argv)
GLFWmonitor monitor = NULL;
GLFWwindow window;
glfwSetErrorCallback(error_callback);
if (!glfwInit())
exit(EXIT_FAILURE);
while ((ch = getopt(argc, argv, "fh")) != -1)
{
switch (ch)
@ -118,11 +123,6 @@ int main(int argc, char** argv)
}
}
glfwSetErrorCallback(error_callback);
if (!glfwInit())
exit(EXIT_FAILURE);
if (monitor)
{
GLFWvidmode mode;