Added back refresh rate window hint.

This commit is contained in:
Camilla Berglund
2013-05-30 20:42:50 +02:00
parent f5dc6e4007
commit 2cd34386bc
8 changed files with 55 additions and 19 deletions
+10 -5
View File
@@ -201,11 +201,13 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
wndconfig.resizable = GL_TRUE;
wndconfig.visible = GL_TRUE;
window->videoMode.width = width;
window->videoMode.height = height;
window->videoMode.redBits = fbconfig.redBits;
window->videoMode.greenBits = fbconfig.greenBits;
window->videoMode.blueBits = fbconfig.blueBits;
// Set up desired video mode
window->videoMode.width = width;
window->videoMode.height = height;
window->videoMode.redBits = Max(_glfw.hints.redBits, 0);
window->videoMode.greenBits = Max(_glfw.hints.greenBits, 0);
window->videoMode.blueBits = Max(_glfw.hints.blueBits, 0);
window->videoMode.refreshRate = Max(_glfw.hints.refreshRate, 0);
}
window->monitor = wndconfig.monitor;
@@ -322,6 +324,9 @@ GLFWAPI void glfwWindowHint(int target, int hint)
case GLFW_STEREO:
_glfw.hints.stereo = hint;
break;
case GLFW_REFRESH_RATE:
_glfw.hints.refreshRate = hint;
break;
case GLFW_RESIZABLE:
_glfw.hints.resizable = hint;
break;