Commits

davedes  committed ea359cc

more accurate FPS counter in GameContainer

  • Participants
  • Parent commits 035138f
  • Branches development

Comments (0)

Files changed (1)

File trunk/Slick/src/org/newdawn/slick/GameContainer.java

 	 */
 	protected void updateFPS() {
 		if (getTime() - lastFPS > 1000) {
-			lastFPS = getTime();
+			lastFPS += 1000;
 			recordedFPS = fps;
 			fps = 0;
 		}
 		
 		graphics = new Graphics(width, height);
 		defaultFont = graphics.getFont();
+
+        lastFPS = getTime();
 	}
 	
 	/**