Skip to content

Commit 7f7f23d

Browse files
committed
Add conditionals for OSX 10.6 and higher
1 parent ab34a70 commit 7f7f23d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ui/drivers/ui_cocoa.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ - (bool)hasFocus {
370370
}
371371

372372
- (void)setVideoMode:(gfx_ctx_mode_t)mode {
373+
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
373374
BOOL isFullScreen = (self.window.styleMask & NSFullScreenWindowMask) == NSFullScreenWindowMask;
374375
if (mode.fullscreen && !isFullScreen)
375376
{
@@ -383,11 +384,14 @@ - (void)setVideoMode:(gfx_ctx_mode_t)mode {
383384
}
384385

385386
if (mode.width > 0)
387+
#endif
386388
{
387389
// HACK(sgc): ensure MTKView posts a drawable resize event
388390
[self.window setContentSize:NSMakeSize(mode.width-1, mode.height)];
389391
}
392+
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
390393
[self.window setContentSize:NSMakeSize(mode.width, mode.height)];
394+
#endif
391395
}
392396

393397
- (void)setCursorVisible:(bool)v {

0 commit comments

Comments
 (0)