From: Ingo Ruhnke Date: Mon, 26 Apr 2004 13:00:56 +0000 (+0000) Subject: - fix for title-demo going weird X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=cb42e13e747888b5118126534a6facff854ebc51;p=supertux.git - fix for title-demo going weird SVN-Revision: 742 --- diff --git a/src/title.cpp b/src/title.cpp index 96dca7288..8ac877171 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -253,6 +253,10 @@ void title(void) Menu::set_current(main_menu); while (Menu::current()) { + // if we spent to much time on a menu entry + if( (update_time - last_update_time) > 1000) + update_time = last_update_time = st_get_ticks(); + // Calculate the movement-factor double frame_ratio = ((double)(update_time-last_update_time))/((double)FRAME_RATE); if(frame_ratio > 1.5) /* Quick hack to correct the unprecise CPU clocks a little bit. */