mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 18:45:23 -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?
|
||||
}
|
||||
|
||||
/* NOTE: Only defined since macOS 10.7 SDK */
|
||||
#define _NSFullScreenWindowMask (1 << 14)
|
||||
int Window_GetWindowState(void) {
|
||||
int flags;
|
||||
|
||||
flags = [winHandle styleMask];
|
||||
if (flags & NSFullScreenWindowMask) return WINDOW_STATE_FULLSCREEN;
|
||||
if (flags & _NSFullScreenWindowMask) return WINDOW_STATE_FULLSCREEN;
|
||||
|
||||
flags = [winHandle isMiniaturized];
|
||||
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) {
|
||||
int value = vsync ? 1 : 0;
|
||||
[ctxHandle setValues:&value forParameter: NSOpenGLContextParameterSwapInterval];
|
||||
[ctxHandle setValues:&value forParameter: NSOpenGLCPSwapInterval];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user