Add GLFW_COCOA_GRAPHICS_SWICTHING

This provides control over whether the context should participate in
macOS Automatic Graphics Switching.

Closes #377.
Closes #935.
This commit is contained in:
Camilla Löwy
2017-01-27 12:02:09 +01:00
parent 4250725a60
commit 77a8f103d8
7 changed files with 47 additions and 0 deletions
+3
View File
@@ -345,6 +345,9 @@ GLFWAPI void glfwWindowHint(int hint, int value)
case GLFW_COCOA_FRAME_AUTOSAVE:
_glfw.hints.window.ns.frame = value ? GLFW_TRUE : GLFW_FALSE;
break;
case GLFW_COCOA_GRAPHICS_SWITCHING:
_glfw.hints.context.nsgl.offline = value ? GLFW_TRUE : GLFW_FALSE;
break;
case GLFW_CENTER_CURSOR:
_glfw.hints.window.centerCursor = value ? GLFW_TRUE : GLFW_FALSE;
break;