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
|
@ -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…
Reference in New Issue