Mercurial > sdl-ios-xcode
annotate src/video/uikit/SDL_uikitappdelegate.m @ 2349:0381047f2210 gsoc2008_iphone
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
author | Holmes Futrell <hfutrell@umail.ucsb.edu> |
---|---|
date | Thu, 17 Jul 2008 22:29:37 +0000 |
parents | |
children | 32602672020e |
rev | line source |
---|---|
2349
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
1 // |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
2 // SDLUIKitDelegate.m |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
3 // iPodSDL |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
4 // |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
5 // Created by Holmes Futrell on 5/29/08. |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
6 // Copyright 2008 __MyCompanyName__. All rights reserved. |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
7 // |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
8 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
9 #import "SDL_uikitappdelegate.h" |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
10 #import "SDL_uikitopenglview.h" |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
11 #import <pthread.h> |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
12 #import "SDL_events_c.h" |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
13 #import "jump.h" |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
14 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
15 #ifdef main |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
16 #undef main |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
17 #endif |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
18 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
19 UIWindow *uikitWindow=nil; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
20 SDL_uikitopenglview *uikitEAGLView=nil; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
21 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
22 extern int SDL_main(int argc, char *argv[]); |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
23 static int forward_argc; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
24 static char **forward_argv; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
25 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
26 int main(int argc, char **argv) { |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
27 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
28 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
29 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
30 /* store arguments */ |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
31 forward_argc = argc; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
32 forward_argv = (char **)malloc(argc * sizeof(char *)); |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
33 int i; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
34 for (i=0; i<argc; i++) { |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
35 forward_argv[i] = malloc( (strlen(argv[i])+1) * sizeof(char)); |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
36 strcpy(forward_argv[i], argv[i]); |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
37 } |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
38 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
39 UIApplicationMain(argc, argv, NULL, @"SDLUIKitDelegate"); |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
40 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
41 [pool release]; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
42 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
43 } |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
44 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
45 @implementation SDLUIKitDelegate |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
46 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
47 - (void)applicationDidFinishLaunching:(UIApplication *)application { |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
48 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
49 /* Set working directory to resource path */ |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
50 [[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]]; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
51 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
52 /* run the user's application, passing argc and argv */ |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
53 int exit_status = SDL_main(forward_argc, forward_argv); |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
54 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
55 /* free the memory we used to hold copies of argc and argv */ |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
56 int i; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
57 for (i=0; i<forward_argc; i++) { |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
58 free(forward_argv[i]); |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
59 } |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
60 free(forward_argv); |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
61 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
62 /* exit, passing the return status from the user's application */ |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
63 exit(exit_status); |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
64 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
65 } |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
66 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
67 - (void)applicationWillTerminate:(UIApplication *)application { |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
68 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
69 SDL_SendQuit(); |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
70 longjmp(*(jump_env()), 1); // hack to prevent automatic termination |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
71 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
72 } |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
73 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
74 -(void)dealloc { |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
75 [uikitWindow release]; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
76 [uikitEAGLView release]; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
77 [super dealloc]; |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
78 } |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
79 |
0381047f2210
The class SDL_uikitappdelegate acts as the UIApplicationDelegate for an iPhone SDL project. This class is reponsible for application control flow, including initial setup of working directory, forwarding command line arguments to the user's main function, and handling application termination.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff
changeset
|
80 @end |