mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 11:03:01 +00:00
Fix frame drops when stopping the stream
This commit is contained in:
parent
c402103fe3
commit
2e2f09be00
@ -969,8 +969,18 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
private void stopConnection() {
|
private void stopConnection() {
|
||||||
if (connecting || connected) {
|
if (connecting || connected) {
|
||||||
connecting = connected = false;
|
connecting = connected = false;
|
||||||
|
|
||||||
|
// Stop may take a few hundred ms to do some network I/O to tell
|
||||||
|
// the server we're going away and clean up. Let it run in a separate
|
||||||
|
// thread to keep things smooth for the UI. Inside moonlight-common,
|
||||||
|
// we prevent another thread from starting a connection before and
|
||||||
|
// during the process of stopping this one.
|
||||||
|
new Thread() {
|
||||||
|
public void run() {
|
||||||
conn.stop();
|
conn.stop();
|
||||||
}
|
}
|
||||||
|
}.start();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 83423959a1b69440e68d6640bf810d82d45c139e
|
Subproject commit a5a402981fc2524b0a6a71971b7cdf9f123ff457
|
Loading…
x
Reference in New Issue
Block a user