Hopefully fix bug that would lock fps setting to defaults.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3403 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
e811ab6c89
commit
5657b38ef0
|
@ -86,9 +86,16 @@ static Uint64 lastFrames = 0;
|
||||||
static Uint32 curTicks = 0; // Number of ticks since execution started
|
static Uint32 curTicks = 0; // Number of ticks since execution started
|
||||||
static Uint32 lastTicks = 0;
|
static Uint32 lastTicks = 0;
|
||||||
static FPSmanager wzFPSmanager;
|
static FPSmanager wzFPSmanager;
|
||||||
|
static BOOL initFPSmanager = FALSE;
|
||||||
|
|
||||||
void setFramerateLimit(int fpsLimit)
|
void setFramerateLimit(int fpsLimit)
|
||||||
{
|
{
|
||||||
|
if (!initFPSmanager)
|
||||||
|
{
|
||||||
|
/* Initialize framerate handler */
|
||||||
|
SDL_initFramerate(&wzFPSmanager);
|
||||||
|
initFPSmanager = TRUE;
|
||||||
|
}
|
||||||
SDL_setFramerate(&wzFPSmanager, fpsLimit);
|
SDL_setFramerate(&wzFPSmanager, fpsLimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,17 +246,14 @@ BOOL frameInitialise(
|
||||||
/* initialise all cursors */
|
/* initialise all cursors */
|
||||||
initCursors();
|
initCursors();
|
||||||
|
|
||||||
/* Initialise the Direct Draw Buffers */
|
|
||||||
if (!screenInitialise(width, height, bitDepth, fullScreen))
|
if (!screenInitialise(width, height, bitDepth, fullScreen))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize framerate handler */
|
|
||||||
SDL_initFramerate( &wzFPSmanager );
|
|
||||||
|
|
||||||
/* Initialise the input system */
|
/* Initialise the input system */
|
||||||
inputInitialise();
|
inputInitialise();
|
||||||
|
|
||||||
/* Initialise the frame rate stuff */
|
/* Initialise the frame rate stuff */
|
||||||
InitFrameStuff();
|
InitFrameStuff();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue