shmup:: no longer ignores frame limit (just sets it to 30)

This commit is contained in:
Zeno Rogue committed 2019-09-12 22:50:12 +02:00
1 parent 32bf6e959e
commit 64ad97cf2f
2 files changed
+6 -5

No files matched your search

+6 -3
View File
@@ -540,6 +540,8 @@ void resize_screen_to(int x, int y) {
setvideomode();
}
int lastframe;
void mainloopiter() {
DEBB(DF_GRAPH, ("main loop\n"));
@@ -553,16 +555,17 @@ void mainloopiter() {
conformal::configure();
lastt = ticks;
ticks = SDL_GetTicks();
callhooks(hooks_fixticks);
timetowait = lastt + 1000 / cframelimit - ticks;
timetowait = lastframe + 1000 / cframelimit - ticks;
cframelimit = vid.framelimit;
if(outoffocus && cframelimit > 10) cframelimit = 10;
bool normal = cmode & sm::NORMAL;
shmup::turn(ticks - lastt);
if(!shmup::on && (multi::alwaysuse || multi::players > 1) && normal)
@@ -615,7 +618,7 @@ void mainloopiter() {
if(!outoffocus) {
drawscreen();
}
lastt = ticks;
lastframe = ticks;
}
Uint8 *keystate = SDL_GetKeyState(NULL);