project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m
changeset 5106 517bdd3865f1
parent 5017 d29cf06d7d11
child 5109 6d2e8a24277e
--- a/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m	Tue Apr 05 20:28:44 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m	Tue Apr 05 22:21:02 2011 +0200
@@ -35,25 +35,14 @@
 
 #define BLACKVIEW_TAG 17935
 #define SECONDBLACKVIEW_TAG 48620
-#define VALGRIND "/opt/fink/bin/valgrind"
+
+@implementation SDLUIKitDelegate (customDelegate)
 
-int main (int argc, char *argv[]) {
-#ifdef VALGRIND_REXEC
-    // Using the valgrind build config, rexec ourself in valgrind
-    // from http://landonf.bikemonkey.org/code/iphone/iPhone_Simulator_Valgrind.20081224.html
-    if (argc < 2 || (argc >= 2 && strcmp(argv[1], "-valgrind") != 0))
-        execl(VALGRIND, VALGRIND, "--leak-check=full", "--dsymutil=yes", argv[0], "-valgrind", NULL);
-#endif
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    int retVal = UIApplicationMain(argc, argv, nil, @"HedgewarsAppDelegate");
-    [pool release];
-    return retVal;
++(NSString *)getAppDelegateClassName {
+    return @"HedgewarsAppDelegate";
 }
 
-int SDL_main(int argc, char **argv) {
-    // dummy function to prevent linkage fail
-    return 0;
-}
+@end
 
 @implementation HedgewarsAppDelegate
 @synthesize mainViewController, overlayController, uiwindow, secondWindow, isInGame;