mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Fixed invalid order of operations.
This commit is contained in:
+5
-5
@@ -100,6 +100,11 @@ int main(int argc, char** argv)
|
|||||||
GLFWmonitor monitor = NULL;
|
GLFWmonitor monitor = NULL;
|
||||||
GLFWwindow window;
|
GLFWwindow window;
|
||||||
|
|
||||||
|
glfwSetErrorCallback(error_callback);
|
||||||
|
|
||||||
|
if (!glfwInit())
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "fh")) != -1)
|
while ((ch = getopt(argc, argv, "fh")) != -1)
|
||||||
{
|
{
|
||||||
switch (ch)
|
switch (ch)
|
||||||
@@ -118,11 +123,6 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
glfwSetErrorCallback(error_callback);
|
|
||||||
|
|
||||||
if (!glfwInit())
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
|
|
||||||
if (monitor)
|
if (monitor)
|
||||||
{
|
{
|
||||||
GLFWvidmode mode;
|
GLFWvidmode mode;
|
||||||
|
|||||||
Reference in New Issue
Block a user