Skip to content

Commit

Permalink
Merging FPS counter fix from slick/dev.
Browse files Browse the repository at this point in the history
  • Loading branch information
itdelatrisu committed Feb 2, 2017
1 parent d5bff3a commit 8aeb4ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/org/newdawn/slick/GameContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ protected int getDelta() {
*/
protected void updateFPS() {
if (getTime() - lastFPS > 1000) {
lastFPS = getTime();
lastFPS += 1000;
recordedFPS = fps;
fps = 0;
}
Expand Down Expand Up @@ -797,6 +797,8 @@ protected void initSystem() throws SlickException {

graphics = new Graphics(width, height);
defaultFont = graphics.getFont();

lastFPS = getTime();
}

/**
Expand Down

0 comments on commit 8aeb4ed

Please # to comment.