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:
Ali El Gariani 2010-09-14 05:37:42 +00:00
parent 224d4650e1
commit 8b2494e69f

View file

@ -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