Commit graph

24 commits

Author SHA1 Message Date
Sam Lantinga
d3ab037501 Made the application activity events consistent between iOS and Android 2012-01-08 13:42:03 -05:00
Sam Lantinga
028e5dcdbd Happy New Year! 2011-12-31 09:28:07 -05:00
Ryan C. Gordon
269da4cbfb Make +sharedAppDelegate return a generic object instead of a SDLUIKitDelegate.
This way subclasses can use it without a lot of casting.

Thanks to Vittorio Giovara for the patch!
2011-11-19 19:23:33 -05:00
Sam Lantinga
ad2a21d404 Lots of fixes importing SDL source wholesale into a new iOS project
--HG--
rename : src/libm/math.h => src/libm/math_libm.h
2011-10-31 05:56:58 -04:00
Kees Bakker
b0e7f4b098 Do not exit in (uikit) postFinishLaunch but store the exit status and use that to return from main()
Also cleanup the stored argv in main() instead of postFinishLaunch.
2011-09-27 23:49:24 +02:00
Kees Bakker
2bd415b42a Use a consistent source code format in src/video/uikit
For example:
* Opening bracket of a method/function on a new line at column 0
* space after "if", "while", etc
2011-09-27 22:51:26 +02:00
Kees Bakker
7797271a96 Cleanup out trailing whitespace in src/video/uikit 2011-09-27 21:02:26 +02:00
Kees Bakker
afc8e3d312 Convert a few TABs into spaces 2011-08-18 22:43:37 +02:00
Tim Angus
2f0bec3220 * SDL_IOS_IDLE_TIMER_DISABLED hint 2011-06-10 14:23:36 +01:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
5e1ffb1cc3 Allow overriding the app delegate on iOS
Vittorio G.  to Eric, Sam

Actually this is much simpler than i thought, I just had to specify a
class method to get the delegate name and then the category can
override that method!
I've attached the patch that enables this features: in my code i could
remove my custom main() and simply add

@implementation SDLUIKitDelegate (customDelegate)
+(NSString *)getAppDelegateClassName {
   return @"HedgewarsAppDelegate";
}
@end

I tested it and with the sdl demos it loads the normal
SDLUIKitDelegate, while in my code it loads my HedgewarsAppDelegate!
2011-04-05 09:50:25 -07:00
Sam Lantinga
dc564a22c8 Delegate should use application: didFinishLaunchingWithOptions:
Vittorio G.  to Sam

would it be possible to update the application delegate in
SDL_uikitappdelagate to the suggest new method
2011-03-14 23:04:52 -07:00
Sam Lantinga
7fda55f8d4 Fixed warnings about unused variables and so forth. 2011-02-17 02:18:41 -08:00
Sam Lantinga
e5803d148c Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
bff537f964 Fixed compile in Xcode 2011-02-11 10:18:34 -08:00
Sam Lantinga
220fd4679a Added vim spacing hints 2011-02-01 09:00:47 -08:00
Sam Lantinga
c9c3d0381a Fixed spacing 2011-02-01 08:59:22 -08:00
Sam Lantinga
2c5a878c4e The arguments to main() should be NULL terminated (SuS v3 compliant) 2010-07-06 22:26:03 -07:00
Ryan C. Gordon
b6ef5b01d8 Much improved multi-display support for iPad.
Fixes most issues and limitations, I think.
2010-05-02 05:08:12 -04:00
Sam Lantinga
a0e019f786 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404438
2010-01-21 06:21:52 +00:00
Sam Lantinga
8f71172aad Fixed bug #847
Roger Willcocks      2009-10-25 08:45:37 PDT

appDidFinishLaunching is triggered before all the setup's complete. The easiest
fix is to arrange for another event to be sent when it's really ready, and run
SDL_main from there. Ref.
http://blog.rightsprite.com/2008/11/iphone-applicationdidfinishlaunching.html

SDL-1.3.0-4563/src/video/uikit/SDL_uikitappdelegate.m:



- (void)postFinishLaunch {

    /* run the user's application, passing argc and argv */
    int exit_status = SDL_main(forward_argc, forward_argv);

    /* free the memory we used to hold copies of argc and argv */
    int i;
    for (i=0; i<forward_argc; i++) {
        free(forward_argv[i]);
    }
    free(forward_argv);

    /* exit, passing the return status from the user's application */
    exit(exit_status);

}

- (void)applicationDidFinishLaunching:(UIApplication *)application {

    /* Set working directory to resource path */
    [[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle
mainBundle] resourcePath]];

    [self performSelector:@selector(postFinishLaunch) withObject:nil
afterDelay:0.0];

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404148
2009-11-02 07:55:42 +00:00
Sam Lantinga
f2ae715bf4 iPhone interruption patch / SDL 1.3
Eric Wing to Sam

I've been sitting on this too long. I need to push.
It's untested because of the unrelated crashing bug I've been experiencing.
Also have a fix for SIZEOF_VOIDP in the config for both iPhone and Mac.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404102
2009-10-17 07:36:45 +00:00
Sam Lantinga
0c30a927ed Updated copyright date
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403321
2008-12-08 00:27:32 +00:00
Sam Lantinga
c6ac35a2bb Final merge of Google Summer of Code 2008 work...
Bring SDL to iPhone and iPod Touch
by Holmes Futrell, mentored by Sam Lantinga

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403222
2008-10-04 06:46:59 +00:00