From 745a691b4d373b44a62f2590f75368679ea67678 Mon Sep 17 00:00:00 2001 From: martin-s Date: Tue, 23 Aug 2011 16:56:44 +0000 Subject: [PATCH] Fix:graphics_cocoa:iPhone build git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4701 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/graphics/cocoa/graphics_cocoa.m | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/navit/navit/graphics/cocoa/graphics_cocoa.m b/navit/navit/graphics/cocoa/graphics_cocoa.m index f6bb00a..c2ae9ea 100644 --- a/navit/navit/graphics/cocoa/graphics_cocoa.m +++ b/navit/navit/graphics/cocoa/graphics_cocoa.m @@ -235,7 +235,11 @@ draw_mode(struct graphics_priv *gr, enum draw_mode_num mode) { if (mode == draw_mode_end) { dbg(0,"end\n"); +#if USE_UIKIT + [gr->view setNeedsDisplay]; +#else [gr->view display]; +#endif } } @@ -416,12 +420,19 @@ event_cocoa_main_loop_run(void) freopen("/tmp/log.txt","a+",stderr); NSLog(@"Test\n"); #endif + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; #if USE_UIKIT +#if 1 + int argc=2; + char *argv[]={"Debug/navit.app/navit","-RegisterForSystemEvents",NULL}; +#else int argc=1; char *argv[]={"navit",NULL}; - int retVal = UIApplicationMain(argc, argv, nil, @"NavitAppDelegate"); +#endif + dbg(0,"calling main\n"); + int retval = UIApplicationMain(argc, argv, nil, @"NavitAppDelegate"); + dbg(0,"retval=%d\n",retval); #else - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NavitAppDelegate * delegate = [[NavitAppDelegate alloc] init]; NSApplication * application = [NSApplication sharedApplication]; [application setDelegate:delegate]; -- 2.7.4