Attempt to avoid framerate bug when paused
This commit is contained in:
parent
1c04cc5be7
commit
f2a4863425
14
rc.c
14
rc.c
|
@ -952,7 +952,9 @@ int main (int argc, char **argv) {
|
|||
void tick(void) {
|
||||
sprite_t *s;
|
||||
|
||||
if (!paused) {
|
||||
SDL_framerateDelay(&manager);
|
||||
}
|
||||
|
||||
|
||||
if (paused) return;
|
||||
|
@ -5263,7 +5265,9 @@ void drawlevel(void) {
|
|||
// update screen
|
||||
//SDL_GL_SwapBuffers();
|
||||
SDL_UpdateRect(screen, 0,0,640,480);
|
||||
if (!paused) {
|
||||
SDL_framerateDelay(&manager);
|
||||
}
|
||||
|
||||
// remove players
|
||||
if (curlevelnum != INTRO_LEVELNUM) {
|
||||
|
@ -5362,7 +5366,7 @@ void drawlevel(void) {
|
|||
// update screen
|
||||
//SDL_GL_SwapBuffers();
|
||||
SDL_UpdateRect(screen, 0,0,640,480);
|
||||
SDL_framerateDelay(&manager);
|
||||
if (!paused) SDL_framerateDelay(&manager);
|
||||
|
||||
// remove players
|
||||
if (curlevelnum != INTRO_LEVELNUM) {
|
||||
|
@ -5460,7 +5464,7 @@ void drawlevel(void) {
|
|||
// update screen
|
||||
//SDL_GL_SwapBuffers();
|
||||
SDL_UpdateRect(screen, 0,0,640,480);
|
||||
SDL_framerateDelay(&manager);
|
||||
if (!paused) SDL_framerateDelay(&manager);
|
||||
|
||||
|
||||
// remove players
|
||||
|
@ -5559,7 +5563,7 @@ void drawlevel(void) {
|
|||
// update screen
|
||||
//SDL_GL_SwapBuffers();
|
||||
SDL_UpdateRect(screen, 0,0,640,480);
|
||||
SDL_framerateDelay(&manager);
|
||||
if (!paused) SDL_framerateDelay(&manager);
|
||||
|
||||
// remove players
|
||||
if (curlevelnum != INTRO_LEVELNUM) {
|
||||
|
@ -8921,9 +8925,11 @@ void togglefullscreen(void) {
|
|||
|
||||
// redraw background
|
||||
SDL_BlitSurface(temps, NULL, screen, NULL);
|
||||
if (!paused) {
|
||||
/* redo framerate manager */
|
||||
SDL_setFramerate(&manager, WANTFPS);
|
||||
}
|
||||
}
|
||||
|
||||
void initsdl(void) {
|
||||
int i;
|
||||
|
@ -11543,7 +11549,7 @@ void checkhiscores(sprite_t *who){
|
|||
}
|
||||
}
|
||||
|
||||
SDL_framerateDelay(&manager);
|
||||
if (!paused) SDL_framerateDelay(&manager);
|
||||
SDL_UpdateRect(screen, 0,0,640,480);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue