Fixed compiling on Mac OS X 10.4
authorSam Lantinga <slouken@libsdl.org>
Sun, 20 Feb 2011 12:39:59 -0800
changeset 5361 1d9e27849ed9
parent 5360 220d3af9121f
child 5362 074fc8730031
Fixed compiling on Mac OS X 10.4
src/video/cocoa/SDL_cocoawindow.m
--- a/src/video/cocoa/SDL_cocoawindow.m	Sun Feb 20 10:54:44 2011 -0800
+++ b/src/video/cocoa/SDL_cocoawindow.m	Sun Feb 20 12:39:59 2011 -0800
@@ -725,11 +725,15 @@
         rect.size.height = bounds.h;
         ConvertNSRect(&rect);
 
-        [nswindow setStyleMask:NSBorderlessWindowMask];
-        [nswindow setContentSize:rect.size];
+        if ([nswindow respondsToSelector: @selector(setStyleMask:)]) {
+            [nswindow performSelector: @selector(setStyleMask:) withObject: (id)NSBorderlessWindowMask];
+        }
         [nswindow setFrameOrigin:rect.origin];
+        [nswindow setContentSize:rect.size];
     } else {
-        [nswindow setStyleMask:GetWindowStyle(window)];
+        if ([nswindow respondsToSelector: @selector(setStyleMask:)]) {
+            [nswindow performSelector: @selector(setStyleMask:) withObject: (id)GetWindowStyle(window)];
+        }
 
         // This doesn't seem to do anything...
         //[nswindow setFrameOrigin:origin];