docs/README-macosx.md
changeset 9066 c2af3ff967cc
parent 9025 d09d4b578e77
child 9774 3478d2a45b31
     1.1 --- a/docs/README-macosx.md	Fri Aug 15 23:18:57 2014 +0200
     1.2 +++ b/docs/README-macosx.md	Fri Aug 15 23:39:14 2014 +0200
     1.3 @@ -45,28 +45,29 @@
     1.4    file with the app. To solve these issues, put the following code in your 
     1.5    NSApplicationDelegate implementation:
     1.6  
     1.7 -  - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
     1.8 -  {
     1.9 -      if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) {
    1.10 -          SDL_Event event;
    1.11 -          event.type = SDL_QUIT;
    1.12 -          SDL_PushEvent(&event);
    1.13 -      }
    1.14  
    1.15 -      return NSTerminateCancel;
    1.16 -  }
    1.17 -
    1.18 -  - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
    1.19 -  {
    1.20 -      if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) {
    1.21 -          SDL_Event event;
    1.22 -          event.type = SDL_DROPFILE;
    1.23 -          event.drop.file = SDL_strdup([filename UTF8String]);
    1.24 -          return (SDL_PushEvent(&event) > 0);
    1.25 -      }
    1.26 -
    1.27 -      return NO;
    1.28 -  }
    1.29 +    - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
    1.30 +    {
    1.31 +        if (SDL_GetEventState(SDL_QUIT) == SDL_ENABLE) {
    1.32 +            SDL_Event event;
    1.33 +            event.type = SDL_QUIT;
    1.34 +            SDL_PushEvent(&event);
    1.35 +        }
    1.36 +    
    1.37 +        return NSTerminateCancel;
    1.38 +    }
    1.39 +    
    1.40 +    - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
    1.41 +    {
    1.42 +        if (SDL_GetEventState(SDL_DROPFILE) == SDL_ENABLE) {
    1.43 +            SDL_Event event;
    1.44 +            event.type = SDL_DROPFILE;
    1.45 +            event.drop.file = SDL_strdup([filename UTF8String]);
    1.46 +            return (SDL_PushEvent(&event) > 0);
    1.47 +        }
    1.48 +    
    1.49 +        return NO;
    1.50 +    }
    1.51  
    1.52  ==============================================================================
    1.53  Using the Simple DirectMedia Layer with a traditional Makefile