From 21d6cfafdc088e75981d710c672a668fddfdf298 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 22 Jan 2014 20:30:56 +0100 Subject: Bug 921: FPSAnimator debug output on stderr shall happen only if DEBUG is enabled --- src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java index 65fed17f2..5bd803500 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java +++ b/src/jogl/classes/com/jogamp/opengl/util/FPSAnimator.java @@ -163,13 +163,17 @@ public class FPSAnimator extends AnimatorBase { setDrawablesExclCtxState(exclusiveContext); FPSAnimator.this.notifyAll(); } - System.err.println("FPSAnimator P1:" + Thread.currentThread() + ": " + toString()); + if(DEBUG) { + System.err.println("FPSAnimator P1:" + Thread.currentThread() + ": " + toString()); + } } } if( shouldRun ) { display(); } else if( shouldStop ) { // STOP - System.err.println("FPSAnimator P4: "+alreadyStopped+", "+ Thread.currentThread() + ": " + toString()); + if(DEBUG) { + System.err.println("FPSAnimator P4: "+alreadyStopped+", "+ Thread.currentThread() + ": " + toString()); + } this.cancel(); if( !alreadyStopped ) { @@ -188,7 +192,9 @@ public class FPSAnimator extends AnimatorBase { } } } else { - System.err.println("FPSAnimator P5: "+alreadyPaused+", "+ Thread.currentThread() + ": " + toString()); + if(DEBUG) { + System.err.println("FPSAnimator P5: "+alreadyPaused+", "+ Thread.currentThread() + ": " + toString()); + } this.cancel(); if( !alreadyPaused ) { // PAUSE -- cgit v1.2.3