mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-16 23:06:07 +00:00
Check if video mode is valid and rename to match with other methods (#5235)
This commit is contained in:
@@ -959,8 +959,11 @@ int GetMonitorRefreshRate(int monitor)
|
||||
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
{
|
||||
const GLFWvidmode *vidmode = glfwGetVideoMode(monitors[monitor]);
|
||||
refresh = vidmode->refreshRate;
|
||||
const GLFWvidmode *mode = glfwGetVideoMode(monitors[monitor]);
|
||||
|
||||
if (mode) refresh = mode->refreshRate;
|
||||
else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor");
|
||||
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
|
||||
|
||||
|
Reference in New Issue
Block a user