From 0c975d9c668cf91e5b2218632c1b1bf21879dfbe Mon Sep 17 00:00:00 2001 From: Christian Ohm Date: Sun, 16 Dec 2007 18:40:25 +0000 Subject: [PATCH] Adjust fps counter position, and save/load showFPS to/from the config file. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3082 4a71c877-e1ca-e34f-864e-861f7616d084 --- src/configuration.c | 6 ++++++ src/display3d.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/configuration.c b/src/configuration.c index a94705034..a7879023c 100644 --- a/src/configuration.c +++ b/src/configuration.c @@ -125,6 +125,11 @@ BOOL loadConfig(void) setWarzoneKeyNumeric("framerate", 60); } + if (getWarzoneKeyNumeric("showFPS", &val)) + { + showFPS = val; + } + // ////////////////////////// // gamma if (getWarzoneKeyNumeric("gamma", &val)) @@ -591,6 +596,7 @@ BOOL saveConfig(void) setWarzoneKeyNumeric("allowSubtitles", war_GetAllowSubtitles()); setWarzoneKeyNumeric("debugmode", bAllowDebugMode); setWarzoneKeyNumeric("framerate", (SDWORD)getFramerateLimit()); + setWarzoneKeyNumeric("showFPS", (SDWORD)showFPS); setWarzoneKeyNumeric("gamma", (SDWORD)gammaValue); setWarzoneKeyNumeric("scroll",(SDWORD)scroll_speed_accel); // scroll setWarzoneKeyNumeric("difficulty", getDifficultyLevel()); // level diff --git a/src/display3d.c b/src/display3d.c index b2738a722..e353d7bea 100644 --- a/src/display3d.c +++ b/src/display3d.c @@ -358,7 +358,7 @@ void draw3DScene( void ) } if (showFPS) { - iV_DrawTextF(RET_X, 478 + E_H, "FPS: %02u", frameGetAverageRate()); + iV_DrawTextF(8, 472 + E_H, "FPS: %02u", frameGetAverageRate()); } if(getDebugMappingStatus() && !demoGetStatus() && !gamePaused()) {