mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-23 04:24:04 +00:00
shmup:: no longer ignores frame limit (just sets it to 30)
This commit is contained in:
@@ -540,6 +540,8 @@ void resize_screen_to(int x, int y) {
|
|||||||
setvideomode();
|
setvideomode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int lastframe;
|
||||||
|
|
||||||
void mainloopiter() {
|
void mainloopiter() {
|
||||||
|
|
||||||
DEBB(DF_GRAPH, ("main loop\n"));
|
DEBB(DF_GRAPH, ("main loop\n"));
|
||||||
@@ -553,10 +555,11 @@ void mainloopiter() {
|
|||||||
|
|
||||||
conformal::configure();
|
conformal::configure();
|
||||||
|
|
||||||
|
lastt = ticks;
|
||||||
ticks = SDL_GetTicks();
|
ticks = SDL_GetTicks();
|
||||||
callhooks(hooks_fixticks);
|
callhooks(hooks_fixticks);
|
||||||
|
|
||||||
timetowait = lastt + 1000 / cframelimit - ticks;
|
timetowait = lastframe + 1000 / cframelimit - ticks;
|
||||||
|
|
||||||
cframelimit = vid.framelimit;
|
cframelimit = vid.framelimit;
|
||||||
if(outoffocus && cframelimit > 10) cframelimit = 10;
|
if(outoffocus && cframelimit > 10) cframelimit = 10;
|
||||||
@@ -615,7 +618,7 @@ void mainloopiter() {
|
|||||||
if(!outoffocus) {
|
if(!outoffocus) {
|
||||||
drawscreen();
|
drawscreen();
|
||||||
}
|
}
|
||||||
lastt = ticks;
|
lastframe = ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
Uint8 *keystate = SDL_GetKeyState(NULL);
|
Uint8 *keystate = SDL_GetKeyState(NULL);
|
||||||
|
Reference in New Issue
Block a user