From b179b98af661372cda14ef44c49d142a0a98a4bc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tobias=20Gl=C3=A4=C3=9Fer?= Date: Mon, 10 May 2004 20:00:22 +0000 Subject: [PATCH] minor updates SVN-Revision: 1081 --- src/gameloop.cpp | 7 +++++-- src/timer.cpp | 8 ++++++++ src/timer.h | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/gameloop.cpp b/src/gameloop.cpp index 6ea6f4a6a..f0986a60e 100644 --- a/src/gameloop.cpp +++ b/src/gameloop.cpp @@ -188,6 +188,7 @@ GameSession::on_escape_press() else if (!Menu::current()) { Menu::set_current(game_menu); + st_pause_ticks_start(); } } @@ -217,7 +218,8 @@ GameSession::process_events() if (Menu::current()) { Menu::current()->event(event); - st_pause_ticks_start(); + if(!Menu::current()) + st_pause_ticks_stop(); } switch(event.type) @@ -259,7 +261,8 @@ GameSession::process_events() if (Menu::current()) { Menu::current()->event(event); - st_pause_ticks_start(); + if(!Menu::current()) + st_pause_ticks_stop(); } else { diff --git a/src/timer.cpp b/src/timer.cpp index 5b22c1393..1fd716d82 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -53,6 +53,14 @@ return; st_pause_count = 0; } +bool st_pause_ticks_started(void) +{ +if(st_pause_count == 0) +return false; +else +return true; +} + Timer::Timer() { init(true); diff --git a/src/timer.h b/src/timer.h index eb516c09c..734c896a0 100644 --- a/src/timer.h +++ b/src/timer.h @@ -27,6 +27,7 @@ unsigned int st_get_ticks(void); void st_pause_ticks_init(void); void st_pause_ticks_start(void); void st_pause_ticks_stop(void); +bool st_pause_ticks_started(void); class Timer { -- 2.11.0