mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-08 07:54:05 +00:00
Display sync modified to allow it to be interrupted.
Thanks to bobjob for this, further thanks to MatthiasM for pointing out that the interrupt should not be swallowed.
This commit is contained in:
parent
0ddafa3842
commit
b911005854
1 changed files with 5 additions and 4 deletions
|
|
@ -424,12 +424,13 @@ public final class Display {
|
|||
savedTimeLate = timeLate;
|
||||
}
|
||||
|
||||
while ( gapTo > timeNow + savedTimeLate ) {
|
||||
try {
|
||||
try {
|
||||
while ( gapTo > timeNow + savedTimeLate ) {
|
||||
Thread.sleep(1);
|
||||
} catch (InterruptedException e) {
|
||||
timeNow = Sys.getTime();
|
||||
}
|
||||
timeNow = Sys.getTime();
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
|
||||
synchronized ( GlobalLock.lock ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue