Permalink
Browse files

Remove the now obsolete distinction between configurable FPS rates fo…

…r MP and campaign. Up the maximum FPS to 500 from 200.

To change the max fps rate now change only the "framerate" line. Patch reviewed by Cyp.
  • Loading branch information...
1 parent 06ab993 commit 4eed3bef79a346143db06a4c374e519c64a08956 @perim perim committed Dec 28, 2010
Showing with 11 additions and 63 deletions.
  1. +1 −1 lib/framework/SDL_framerate.h
  2. +10 −55 src/configuration.cpp
  3. +0 −2 src/configuration.h
  4. +0 −3 src/frontend.cpp
  5. +0 −2 src/main.cpp
@@ -16,7 +16,7 @@
/* Some rates in Hz */
-#define FPS_UPPER_LIMIT 200
+#define FPS_UPPER_LIMIT 500
#define FPS_LOWER_LIMIT 1
#define FPS_DEFAULT 30
View
@@ -52,44 +52,17 @@
#define MASTERSERVERPORT 9990
#define GAMESERVERPORT 2100
-/* Frame limit for multiplayer games (excluding skirmish and campaign) */
-#define MP_FRAME_LIMIT 45
-
-/* Default frame limit for single player: skirmish ans campaign */
-#define SP_FRAME_LIMIT 60
-
-// current frame limit for single player modes
-static SDWORD spFrameLimit = SP_FRAME_LIMIT;
-
-static void setSinglePlayerFrameLimit(SDWORD limit)
-{
- spFrameLimit = limit;
-}
-
-static SDWORD getSinglePlayerFrameLimit(void)
-{
- return spFrameLimit;
-}
-
-void setDefaultFrameRateLimit(void)
-{
- if(bMultiPlayer && NetPlay.bComms)
- {
- setFramerateLimit(MP_FRAME_LIMIT); // true multiplayer
- }
- else
- {
- setFramerateLimit(getSinglePlayerFrameLimit()); // single player
- }
-}
-
// ////////////////////////////////////////////////////////////////////////////
BOOL loadConfig(void)
{
int val;
char sBuf[255];
+ bool bad_resolution = false;
- openWarzoneKey();
+ if (!openWarzoneKey())
+ {
+ return false;
+ }
// options screens.
// //////////////////////////
@@ -134,17 +107,6 @@ BOOL loadConfig(void)
war_SetMusicEnabled(val);
}
- if (getWarzoneKeyNumeric("SinglePlayerFPS", &val))
- {
- setSinglePlayerFrameLimit(val);
- setFramerateLimit(getSinglePlayerFrameLimit());
- }
- else
- {
- setFramerateLimit(getSinglePlayerFrameLimit());
- setWarzoneKeyNumeric("SinglePlayerFPS", getSinglePlayerFrameLimit());
- }
-
if (getWarzoneKeyString("language", sBuf))
{
setLanguage(sBuf);
@@ -566,18 +528,6 @@ BOOL loadConfig(void)
NetPlay.isUPNP = 1;
}
- return closeWarzoneKey();
-}
-
-BOOL loadRenderMode(void)
-{
- SDWORD val;
- bool bad_resolution = false;
-
- if( !openWarzoneKey() ) {
- return false;
- }
-
if (getWarzoneKeyNumeric("FSAA", &val))
{
war_setFSAA(val);
@@ -666,6 +616,11 @@ BOOL loadRenderMode(void)
pie_SetVideoBufferDepth(val);
}
+ if (getWarzoneKeyNumeric("framerate", &val))
+ {
+ setFramerateLimit(val);
+ }
+
return closeWarzoneKey();
}
View
@@ -25,11 +25,9 @@
#define __INCLUDED_SRC_CONFIGURATION_H__
BOOL loadConfig(void);
-BOOL loadRenderMode(void);
BOOL saveConfig(void);
BOOL reloadMPConfig(void);
void closeConfig( void );
-void setDefaultFrameRateLimit(void);
/// Default map for Skirmish
static const char DEFAULTSKIRMISHMAP[] = "Sk-Rush";
View
@@ -1779,8 +1779,5 @@ void changeTitleMode(tMode mode)
break;
}
- /* Set default frame rate limit */
- setDefaultFrameRateLimit();
-
return;
}
View
@@ -1232,8 +1232,6 @@ int main(int argc, char *argv[])
loadConfig();
- loadRenderMode(); //get the registry entry for clRendMode
-
NETinit(true);
// parse the command line

0 comments on commit 4eed3be

Please sign in to comment.