mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 03:25:14 -04:00
try to fix cocoa build not compiling against 10.5 SDK
This commit is contained in:
parent
3c25686757
commit
db380b53db
@ -189,11 +189,13 @@ void Window_Show(void) {
|
|||||||
RefreshWindowBounds(); // TODO: even necessary?
|
RefreshWindowBounds(); // TODO: even necessary?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* NOTE: Only defined since macOS 10.7 SDK */
|
||||||
|
#define _NSFullScreenWindowMask (1 << 14)
|
||||||
int Window_GetWindowState(void) {
|
int Window_GetWindowState(void) {
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
flags = [winHandle styleMask];
|
flags = [winHandle styleMask];
|
||||||
if (flags & NSFullScreenWindowMask) return WINDOW_STATE_FULLSCREEN;
|
if (flags & _NSFullScreenWindowMask) return WINDOW_STATE_FULLSCREEN;
|
||||||
|
|
||||||
flags = [winHandle isMiniaturized];
|
flags = [winHandle isMiniaturized];
|
||||||
return flags ? WINDOW_STATE_MINIMISED : WINDOW_STATE_NORMAL;
|
return flags ? WINDOW_STATE_MINIMISED : WINDOW_STATE_NORMAL;
|
||||||
@ -481,5 +483,5 @@ cc_bool GLContext_SwapBuffers(void) {
|
|||||||
|
|
||||||
void GLContext_SetFpsLimit(cc_bool vsync, float minFrameMs) {
|
void GLContext_SetFpsLimit(cc_bool vsync, float minFrameMs) {
|
||||||
int value = vsync ? 1 : 0;
|
int value = vsync ? 1 : 0;
|
||||||
[ctxHandle setValues:&value forParameter: NSOpenGLContextParameterSwapInterval];
|
[ctxHandle setValues:&value forParameter: NSOpenGLCPSwapInterval];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user