src/video/cocoa/SDL_cocoawindow.m
changeset 5375 16877f74123c
parent 5374 dacb4f5e0dd3
child 5376 183ec2d4485c
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Mon Feb 21 15:25:49 2011 -0800
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Mon Feb 21 16:45:23 2011 -0800
     1.3 @@ -637,6 +637,19 @@
     1.4  }
     1.5  
     1.6  void
     1.7 +Cocoa_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
     1.8 +{
     1.9 +    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    1.10 +    NSImage *nsimage = Cocoa_CreateImage(icon);
    1.11 +
    1.12 +    if (nsimage) {
    1.13 +        [NSApp setApplicationIconImage:nsimage];
    1.14 +    }
    1.15 +
    1.16 +    [pool release];
    1.17 +}
    1.18 +
    1.19 +void
    1.20  Cocoa_SetWindowPosition(_THIS, SDL_Window * window)
    1.21  {
    1.22      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];