mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 06:25:46 +00:00
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.
This commit is contained in:
parent
632fcbfeaa
commit
dbe9667c3d
2 changed files with 6 additions and 2 deletions
|
|
@ -121,8 +121,10 @@ public class OpenGL extends AWTGLCanvas implements Test {
|
|||
}
|
||||
try {
|
||||
swapBuffers();
|
||||
if (isVisible())
|
||||
if (isVisible()) {
|
||||
Thread.yield(); // Helps input responsiveness on linux
|
||||
repaint();
|
||||
}
|
||||
} catch (Exception e) {/*OK*/
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,8 +66,10 @@ public class Speed extends AWTGLCanvas implements Test {
|
|||
|
||||
try {
|
||||
swapBuffers();
|
||||
if (isVisible())
|
||||
if (isVisible()) {
|
||||
Thread.yield(); // Helps input responsiveness on linux
|
||||
repaint();
|
||||
}
|
||||
} catch (Exception e) {/*OK*/
|
||||
}
|
||||
if (startTime > System.currentTimeMillis()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue