mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-02-16 10:30:47 +00:00
Fix the renderer thread causing NvConnection.stop() to block forever. Remove the hack to workaround this bug.
This commit is contained in:
@@ -72,12 +72,15 @@ public class SwingCpuDecoderRenderer implements VideoDecoderRenderer {
|
||||
{
|
||||
long diff = nextFrameTime - System.currentTimeMillis();
|
||||
|
||||
if (diff > WAIT_CEILING_MS) {
|
||||
try {
|
||||
Thread.sleep(diff);
|
||||
} catch (InterruptedException e) {
|
||||
return;
|
||||
}
|
||||
if (diff < WAIT_CEILING_MS) {
|
||||
// We must call Thread.sleep in order to be interruptable
|
||||
diff = 0;
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(diff);
|
||||
} catch (InterruptedException e) {
|
||||
return;
|
||||
}
|
||||
|
||||
nextFrameTime = computePresentationTimeMs(targetFps);
|
||||
|
||||
@@ -40,7 +40,6 @@ public class KeyboardHandler implements KeyListener {
|
||||
event.getKeyCode() == KeyEvent.VK_Q) {
|
||||
System.out.println("quitting");
|
||||
parent.close();
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
translator.sendKeyDown(keyMap, modifier);
|
||||
|
||||
Reference in New Issue
Block a user