diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -292,8 +292,10 @@ int main(int argc, char *argv[]) { game->frames = 0; } - /* Wait for how long it takes to render the frame at the most recent measurement. */ - if ( !gameopts.no_framerate_limit ) usleep(game->time_to_render/1000); + /* Wait for how long it takes the graphics card to catch up, at the most recent measurement. */ + if ( game->time_physics < game->time_render ) { + if ( !gameopts.no_framerate_limit ) usleep(game->time_render-game->time_physics); + } } |