mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 16:30:45 +00:00
Fix error return value for glfwGetVideoMode
The function returned a pointer to a zeroed video mode instead of NULL on error because errors were not propagated up from the platform. Fixes #1292
This commit is contained in:
+2
-1
@@ -109,9 +109,10 @@ GLFWvidmode* _glfwGetVideoModesNull(_GLFWmonitor* monitor, int* found)
|
||||
return mode;
|
||||
}
|
||||
|
||||
void _glfwGetVideoModeNull(_GLFWmonitor* monitor, GLFWvidmode* mode)
|
||||
GLFWbool _glfwGetVideoModeNull(_GLFWmonitor* monitor, GLFWvidmode* mode)
|
||||
{
|
||||
*mode = getVideoMode();
|
||||
return GLFW_TRUE;
|
||||
}
|
||||
|
||||
GLFWbool _glfwGetGammaRampNull(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
|
||||
|
||||
Reference in New Issue
Block a user