src/video/cocoa/SDL_cocoawindow.m
changeset 7946 57c34a54b7c2
parent 7915 86ad156a82ab
child 7948 64e133a8b15e
equal deleted inserted replaced
7945:764129077d18 7946:57c34a54b7c2
   746             screen = candidate;
   746             screen = candidate;
   747             rect.origin.x -= screenRect.origin.x;
   747             rect.origin.x -= screenRect.origin.x;
   748             rect.origin.y -= screenRect.origin.y;
   748             rect.origin.y -= screenRect.origin.y;
   749         }
   749         }
   750     }
   750     }
   751     nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:NO screen:screen];
   751 
       
   752     @try {
       
   753         nswindow = [[SDLWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffered defer:NO screen:screen];
       
   754     }
       
   755     @catch (NSException *e) {
       
   756         SDL_SetError("%s", [[e reason] UTF8String]);
       
   757         return -1;
       
   758     }
   752     [nswindow setBackgroundColor:[NSColor blackColor]];
   759     [nswindow setBackgroundColor:[NSColor blackColor]];
   753 
   760 
   754     /* Create a default view for this window */
   761     /* Create a default view for this window */
   755     rect = [nswindow contentRectForFrameRect:[nswindow frame]];
   762     rect = [nswindow contentRectForFrameRect:[nswindow frame]];
   756     NSView *contentView = [[SDLView alloc] initWithFrame:rect];
   763     NSView *contentView = [[SDLView alloc] initWithFrame:rect];