Moved hint clamping into glfwWindowHint() per @elmindreda

This commit is contained in:
Cem Karan 2015-12-17 11:34:16 -05:00
parent c8c7ad249a
commit f5e83caeeb

View File

@ -135,14 +135,14 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
fbconfig = _glfw.hints.framebuffer; fbconfig = _glfw.hints.framebuffer;
ctxconfig = _glfw.hints.context; ctxconfig = _glfw.hints.context;
wndconfig = _glfw.hints.window; wndconfig = _glfw.hints.window;
fbconfig.transparent = _glfw.hints.framebuffer.transparent ? GLFW_TRUE : GLFW_FALSE; fbconfig.transparent = _glfw.hints.framebuffer.transparent;
wndconfig.width = width; wndconfig.width = width;
wndconfig.height = height; wndconfig.height = height;
wndconfig.title = title; wndconfig.title = title;
wndconfig.monitor = (_GLFWmonitor*) monitor; wndconfig.monitor = (_GLFWmonitor*) monitor;
ctxconfig.share = (_GLFWwindow*) share; ctxconfig.share = (_GLFWwindow*) share;
wndconfig.transparent = _glfw.hints.framebuffer.transparent ? GLFW_TRUE : GLFW_FALSE; wndconfig.transparent = _glfw.hints.framebuffer.transparent;
if (ctxconfig.share) if (ctxconfig.share)
{ {
@ -320,7 +320,7 @@ GLFWAPI void glfwWindowHint(int target, int hint)
_glfw.hints.framebuffer.doublebuffer = hint ? GLFW_TRUE : GLFW_FALSE; _glfw.hints.framebuffer.doublebuffer = hint ? GLFW_TRUE : GLFW_FALSE;
break; break;
case GLFW_TRANSPARENT: case GLFW_TRANSPARENT:
_glfw.hints.framebuffer.transparent = hint; _glfw.hints.framebuffer.transparent = hint ? GLFW_TRUE : GLFW_FALSE;
break; break;
case GLFW_SAMPLES: case GLFW_SAMPLES:
_glfw.hints.framebuffer.samples = hint; _glfw.hints.framebuffer.samples = hint;