mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-17 14:22:00 +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();
|
long diff = nextFrameTime - System.currentTimeMillis();
|
||||||
|
|
||||||
if (diff > WAIT_CEILING_MS) {
|
if (diff < WAIT_CEILING_MS) {
|
||||||
try {
|
// We must call Thread.sleep in order to be interruptable
|
||||||
Thread.sleep(diff);
|
diff = 0;
|
||||||
} catch (InterruptedException e) {
|
}
|
||||||
return;
|
|
||||||
}
|
try {
|
||||||
|
Thread.sleep(diff);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nextFrameTime = computePresentationTimeMs(targetFps);
|
nextFrameTime = computePresentationTimeMs(targetFps);
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ public class KeyboardHandler implements KeyListener {
|
|||||||
event.getKeyCode() == KeyEvent.VK_Q) {
|
event.getKeyCode() == KeyEvent.VK_Q) {
|
||||||
System.out.println("quitting");
|
System.out.println("quitting");
|
||||||
parent.close();
|
parent.close();
|
||||||
System.exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
translator.sendKeyDown(keyMap, modifier);
|
translator.sendKeyDown(keyMap, modifier);
|
||||||
|
|||||||
Reference in New Issue
Block a user