Performance: Maybe this fixes very big frame times.

This commit is contained in:
Jan Philipp Timme 2014-12-09 11:03:02 +01:00
parent 742ff1eafc
commit 5610ff7806
1 changed files with 1 additions and 1 deletions

View File

@ -148,8 +148,8 @@ public class GameFrame extends JFrame {
bufferedGraphics.dispose();
}
} while (this.bufferStrategy.contentsRestored()); //Redraw in case the VolatileImage was restored
this.bufferStrategy.show(); //Show the drawn image
} while (this.bufferStrategy.contentsLost()); //Redraw in case the VolatileImage got lost
this.bufferStrategy.show(); //Show the drawn image
Toolkit.getDefaultToolkit().sync(); //Tell the OS to update its graphics of the window.
this.frameTime = System.nanoTime() - frameStart; //Update frameTime
}