From: <eli...@us...> - 2007-11-09 05:11:33
|
Revision: 2918 http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=2918&view=rev Author: elias_naur Date: 2007-11-08 21:11:29 -0800 (Thu, 08 Nov 2007) Log Message: ----------- Added a Thread.yield() to applets tests that repaint() last in paintGL() to help input responsiveness on linux. Thanks to Kappa for debugging and finding the workaround. Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/test/applet/OpenGL.java trunk/LWJGL/src/java/org/lwjgl/test/applet/Speed.java Modified: trunk/LWJGL/src/java/org/lwjgl/test/applet/OpenGL.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/applet/OpenGL.java 2007-11-07 23:17:14 UTC (rev 2917) +++ trunk/LWJGL/src/java/org/lwjgl/test/applet/OpenGL.java 2007-11-09 05:11:29 UTC (rev 2918) @@ -121,8 +121,10 @@ } try { swapBuffers(); - if (isVisible()) + if (isVisible()) { + Thread.yield(); // Helps input responsiveness on linux repaint(); + } } catch (Exception e) {/*OK*/ } } Modified: trunk/LWJGL/src/java/org/lwjgl/test/applet/Speed.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/test/applet/Speed.java 2007-11-07 23:17:14 UTC (rev 2917) +++ trunk/LWJGL/src/java/org/lwjgl/test/applet/Speed.java 2007-11-09 05:11:29 UTC (rev 2918) @@ -66,8 +66,10 @@ try { swapBuffers(); - if (isVisible()) + if (isVisible()) { + Thread.yield(); // Helps input responsiveness on linux repaint(); + } } catch (Exception e) {/*OK*/ } if (startTime > System.currentTimeMillis()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |