Add GLFW_COCOA_FRAME_AUTOSAVE

Fixes #195.
This commit is contained in:
Camilla Löwy
2017-01-01 19:41:50 +01:00
parent 0f488ac286
commit 4661315192
6 changed files with 20 additions and 0 deletions
+3
View File
@@ -1036,6 +1036,9 @@ static GLFWbool createNativeWindow(_GLFWwindow* window,
[window->ns.object zoom:nil];
}
if (wndconfig->ns.frame)
[window->ns.object setFrameAutosaveName:[NSString stringWithUTF8String:wndconfig->title]];
window->ns.view = [[GLFWContentView alloc] initWithGlfwWindow:window];
if (wndconfig->ns.retina)
+1
View File
@@ -266,6 +266,7 @@ struct _GLFWwndconfig
GLFWbool maximized;
struct {
GLFWbool retina;
GLFWbool frame;
} ns;
};
+3
View File
@@ -346,6 +346,9 @@ GLFWAPI void glfwWindowHint(int hint, int value)
case GLFW_COCOA_RETINA_FRAMEBUFFER:
_glfw.hints.window.ns.retina = value ? GLFW_TRUE : GLFW_FALSE;
break;
case GLFW_COCOA_FRAME_AUTOSAVE:
_glfw.hints.window.ns.frame = value ? GLFW_TRUE : GLFW_FALSE;
break;
case GLFW_CLIENT_API:
_glfw.hints.context.client = value;
break;