mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Fix not clearing states when quitting game while queueing
This commit is contained in:
parent
03ad02bd4d
commit
53d67616c3
@ -282,10 +282,13 @@ window.addEventListener(BxEvent.DATA_CHANNEL_CREATED, e => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function unload() {
|
function unload() {
|
||||||
if (!STATES.isPlaying) {
|
if (!STATES.isPlaying && !Object.keys(STATES.currentStream).length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STATES.isPlaying = false;
|
||||||
|
STATES.currentStream = {};
|
||||||
|
|
||||||
// Stop MKB listeners
|
// Stop MKB listeners
|
||||||
EmulatedMkbHandler.getInstance().destroy();
|
EmulatedMkbHandler.getInstance().destroy();
|
||||||
NativeMkbHandler.getInstance().destroy();
|
NativeMkbHandler.getInstance().destroy();
|
||||||
@ -293,8 +296,6 @@ function unload() {
|
|||||||
// Destroy StreamPlayer
|
// Destroy StreamPlayer
|
||||||
STATES.currentStream.streamPlayer?.destroy();
|
STATES.currentStream.streamPlayer?.destroy();
|
||||||
|
|
||||||
STATES.isPlaying = false;
|
|
||||||
STATES.currentStream = {};
|
|
||||||
window.BX_EXPOSED.shouldShowSensorControls = false;
|
window.BX_EXPOSED.shouldShowSensorControls = false;
|
||||||
window.BX_EXPOSED.stopTakRendering = false;
|
window.BX_EXPOSED.stopTakRendering = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user