Mercurial > sdl-ios-xcode
diff src/video/uikit/SDL_uikitevents.m @ 5134:7b7da52e8775
Fixed spacing
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 01 Feb 2011 08:59:22 -0800 |
parents | dc0dfdd58f27 |
children | b530ef003506 |
line wrap: on
line diff
--- a/src/video/uikit/SDL_uikitevents.m Tue Feb 01 08:54:34 2011 -0800 +++ b/src/video/uikit/SDL_uikitevents.m Tue Feb 01 08:59:22 2011 -0800 @@ -32,25 +32,24 @@ void UIKit_PumpEvents(_THIS) { - /* - When the user presses the 'home' button on the iPod - the application exits -- immediatly. - - Unlike in Mac OS X, it appears there is no way to cancel the termination. - - This doesn't give the SDL user's application time to respond to an SDL_Quit event. - So what we do is that in the UIApplicationDelegate class (SDLUIApplicationDelegate), - when the delegate receives the ApplicationWillTerminate message, we execute - a longjmp statement to get back here, preventing an immediate exit. - */ - if (setjmp(*jump_env()) == 0) { - /* if we're setting the jump, rather than jumping back */ - SInt32 result; - do { - result = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, TRUE); - } while(result == kCFRunLoopRunHandledSource); - } - + /* + When the user presses the 'home' button on the iPod + the application exits -- immediatly. + + Unlike in Mac OS X, it appears there is no way to cancel the termination. + + This doesn't give the SDL user's application time to respond to an SDL_Quit event. + So what we do is that in the UIApplicationDelegate class (SDLUIApplicationDelegate), + when the delegate receives the ApplicationWillTerminate message, we execute + a longjmp statement to get back here, preventing an immediate exit. + */ + if (setjmp(*jump_env()) == 0) { + /* if we're setting the jump, rather than jumping back */ + SInt32 result; + do { + result = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, TRUE); + } while(result == kCFRunLoopRunHandledSource); + } } /* vi: set ts=4 sw=4 expandtab: */