fix incorrect calling of update method

This commit is contained in:
yugecin
2017-01-10 14:11:15 +01:00
parent 6aefa559f4
commit 90684c084a
4 changed files with 9 additions and 3 deletions

View File

@@ -86,7 +86,7 @@ public class Demux implements KeyListener, MouseListener {
}
public void preRenderUpdate(int delta) {
state.update(delta);
state.preRenderUpdate(delta);
}
public void render(Graphics g) {

View File

@@ -96,6 +96,7 @@ public class DisplayContainer {
timeSinceLastRender += delta;
input.poll(width, height);
demux.update(delta);
int maxRenderInterval;
if (Display.isVisible() && Display.isActive()) {
@@ -114,7 +115,7 @@ public class DisplayContainer {
graphics.resetTransform();
*/
demux.update(timeSinceLastRender);
demux.preRenderUpdate(timeSinceLastRender);
demux.render(graphics);
realRenderInterval = timeSinceLastRender;