Fixed compiling on Mac OS X 10.4
authorSam Lantinga <slouken@libsdl.org>
Sun, 20 Feb 2011 12:39:59 -0800
changeset 53611d9e27849ed9
parent 5360 220d3af9121f
child 5362 074fc8730031
Fixed compiling on Mac OS X 10.4
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Sun Feb 20 10:54:44 2011 -0800
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Sun Feb 20 12:39:59 2011 -0800
     1.3 @@ -725,11 +725,15 @@
     1.4          rect.size.height = bounds.h;
     1.5          ConvertNSRect(&rect);
     1.6  
     1.7 -        [nswindow setStyleMask:NSBorderlessWindowMask];
     1.8 -        [nswindow setContentSize:rect.size];
     1.9 +        if ([nswindow respondsToSelector: @selector(setStyleMask:)]) {
    1.10 +            [nswindow performSelector: @selector(setStyleMask:) withObject: (id)NSBorderlessWindowMask];
    1.11 +        }
    1.12          [nswindow setFrameOrigin:rect.origin];
    1.13 +        [nswindow setContentSize:rect.size];
    1.14      } else {
    1.15 -        [nswindow setStyleMask:GetWindowStyle(window)];
    1.16 +        if ([nswindow respondsToSelector: @selector(setStyleMask:)]) {
    1.17 +            [nswindow performSelector: @selector(setStyleMask:) withObject: (id)GetWindowStyle(window)];
    1.18 +        }
    1.19  
    1.20          // This doesn't seem to do anything...
    1.21          //[nswindow setFrameOrigin:origin];