Sleep in SDL GUI when no event, allows using the GUI w/ GPS
authorzaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 5 Nov 2007 14:35:57 +0000 (14:35 +0000)
committerzaxl <zaxl@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Mon, 5 Nov 2007 14:35:57 +0000 (14:35 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@521 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/src/gui/sdl/gui_sdl_window.cpp

index 3cefbba..7848278 100644 (file)
@@ -226,7 +226,8 @@ static int gui_run_main_loop(struct gui_priv *this_)
 
                if(enable_timer)
                        profile(0,"graphics_redraw");
-               g_main_context_iteration (NULL, FALSE);
+               if (!g_main_context_iteration (NULL, FALSE))
+                       sleep(1);
 //             profile_timer("main context");
 
        //      graphics_get_data(this_->gra,DLid);