mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 00:30:57 +00:00
Added error setting for more cases of invalid tokens.
This commit is contained in:
+4
-5
@@ -468,6 +468,7 @@ GLFWAPI void glfwOpenWindowHint(int target, int hint)
|
||||
_glfwLibrary.hints.glRobustness = hint;
|
||||
break;
|
||||
default:
|
||||
_glfwSetError(GLFW_INVALID_ENUM, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -748,12 +749,10 @@ GLFWAPI int glfwGetWindowParam(GLFWwindow handle, int param)
|
||||
return window->glProfile;
|
||||
case GLFW_OPENGL_ROBUSTNESS:
|
||||
return window->glRobustness;
|
||||
default:
|
||||
_glfwSetError(GLFW_INVALID_ENUM,
|
||||
"glfwGetWindowParam: Invalid enum value for 'param' "
|
||||
"parameter");
|
||||
return 0;
|
||||
}
|
||||
|
||||
_glfwSetError(GLFW_INVALID_ENUM, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user