Update display before waiting between frames.
This should reduce display lag with input and sound, but it was only <20 ms.
This commit is contained in:
parent
224d4650e1
commit
8b2494e69f
1 changed files with 1 additions and 1 deletions
|
@ -1281,11 +1281,11 @@ void display::draw_wrap(bool update,bool force,bool changed)
|
|||
|
||||
if(update) {
|
||||
if(force || changed) {
|
||||
update_display();
|
||||
if(!force && wait_time > 0) {
|
||||
// If it's not time yet to draw, delay until it is
|
||||
SDL_Delay(wait_time);
|
||||
}
|
||||
update_display();
|
||||
}
|
||||
|
||||
// Set the theortical next draw time
|
||||
|
|
Loading…
Add table
Reference in a new issue