From 5610ff78067735f2991108f9d6553f18db40d464 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Tue, 9 Dec 2014 11:03:02 +0100 Subject: [PATCH] Performance: Maybe this fixes very big frame times. --- src/de/teamteamteam/spacescooter/GameFrame.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/teamteamteam/spacescooter/GameFrame.java b/src/de/teamteamteam/spacescooter/GameFrame.java index fa2973d..bf4f8f2 100644 --- a/src/de/teamteamteam/spacescooter/GameFrame.java +++ b/src/de/teamteamteam/spacescooter/GameFrame.java @@ -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 }