mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-04 22:57: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() {
|
||||
if (!STATES.isPlaying) {
|
||||
if (!STATES.isPlaying && !Object.keys(STATES.currentStream).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
STATES.isPlaying = false;
|
||||
STATES.currentStream = {};
|
||||
|
||||
// Stop MKB listeners
|
||||
EmulatedMkbHandler.getInstance().destroy();
|
||||
NativeMkbHandler.getInstance().destroy();
|
||||
@ -293,8 +296,6 @@ function unload() {
|
||||
// Destroy StreamPlayer
|
||||
STATES.currentStream.streamPlayer?.destroy();
|
||||
|
||||
STATES.isPlaying = false;
|
||||
STATES.currentStream = {};
|
||||
window.BX_EXPOSED.shouldShowSensorControls = false;
|
||||
window.BX_EXPOSED.stopTakRendering = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user