Add conditionals for OSX 10.6 and higher

This commit is contained in:
twinaphex 2018-08-30 17:38:43 +02:00
parent ab34a70873
commit 7f7f23d08b

View File

@ -370,6 +370,7 @@ static char** waiting_argv;
}
- (void)setVideoMode:(gfx_ctx_mode_t)mode {
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
BOOL isFullScreen = (self.window.styleMask & NSFullScreenWindowMask) == NSFullScreenWindowMask;
if (mode.fullscreen && !isFullScreen)
{
@ -383,11 +384,14 @@ static char** waiting_argv;
}
if (mode.width > 0)
#endif
{
// HACK(sgc): ensure MTKView posts a drawable resize event
[self.window setContentSize:NSMakeSize(mode.width-1, mode.height)];
}
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
[self.window setContentSize:NSMakeSize(mode.width, mode.height)];
#endif
}
- (void)setCursorVisible:(bool)v {