projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed problem with global animations being restarted if screen changes to same game...
[rocksndiamonds.git]
/
src
/
game.c
diff --git
a/src/game.c
b/src/game.c
index bc402eca62cde8020db29942716fa85d592a1b5b..d615d6338d5f2b914df6b1378ee135b34f84acbd 100644
(file)
--- a/
src/game.c
+++ b/
src/game.c
@@
-11212,7
+11212,7
@@
void GameActionsExt()
AdvanceFrameAndPlayerCounters(-1); /* advance counters for all players */
AdvanceFrameAndPlayerCounters(-1); /* advance counters for all players */
- if (
options.debug) /* calculate frames per second */
+ if (
global.show_frames_per_second)
{
static unsigned int fps_counter = 0;
static int fps_frames = 0;
{
static unsigned int fps_counter = 0;
static int fps_frames = 0;
@@
-11220,15
+11220,20
@@
void GameActionsExt()
fps_frames++;
fps_frames++;
- if (fps_delay_ms >= 500) /* calculate
fps
every 0.5 seconds */
+ if (fps_delay_ms >= 500) /* calculate
FPS
every 0.5 seconds */
{
global.frames_per_second = 1000 * (float)fps_frames / fps_delay_ms;
fps_frames = 0;
fps_counter = Counter();
{
global.frames_per_second = 1000 * (float)fps_frames / fps_delay_ms;
fps_frames = 0;
fps_counter = Counter();
+ /* always draw FPS to screen after FPS value was updated */
redraw_mask |= REDRAW_FPS;
}
redraw_mask |= REDRAW_FPS;
}
+
+ /* only draw FPS if no screen areas are deactivated (invisible warp mode) */
+ if (GetDrawDeactivationMask() == REDRAW_NONE)
+ redraw_mask |= REDRAW_FPS;
}
}
}
}