diff --git a/core/src/processing/awt/PSurfaceAWT.java b/core/src/processing/awt/PSurfaceAWT.java index 27c7b8e6be..a0d4cdefce 100644 --- a/core/src/processing/awt/PSurfaceAWT.java +++ b/core/src/processing/awt/PSurfaceAWT.java @@ -90,7 +90,7 @@ public class PSurfaceAWT extends PSurfaceNone { int sketchWidth; int sketchHeight; - int windowScaleFactor; + int windowScaleFactor = 1; public PSurfaceAWT(PGraphics graphics) { @@ -228,7 +228,8 @@ public void validate() { oldSize = newSize; sketch.setSize(newSize.width / windowScaleFactor, newSize.height / windowScaleFactor); // try { - render(); + // DANILO TOMASONI: removed render here, it will be handled only by animation thread + //render(); // } catch (IllegalStateException ise) { // System.out.println(ise.getMessage()); // } @@ -247,7 +248,8 @@ public void update(Graphics g) { public void paint(Graphics screen) { // System.out.println("painting"); // if (useStrategy) { - render(); + // DANILO TOMASONI: removed render here, it will be handled only by animation thread + //render(); /* if (graphics != null) { System.out.println("drawing to screen " + canvas); @@ -281,7 +283,7 @@ public void addNotify() { */ - synchronized protected void render() { + protected void render() { if (canvas.isDisplayable() && graphics.image != null) { if (canvas.getBufferStrategy() == null) {