Fix Stop + broken buttons: use location.reload() which preserves hash but fully unloads page, killing workers and audio. Revert pathname routing (unnecessary).
This commit is contained in:
@@ -65,9 +65,10 @@
|
||||
}
|
||||
|
||||
function stopEmulator() {
|
||||
// Navigate to an actual server path to force full page unload
|
||||
// which kills Web Workers, AudioContexts, and WASM threads
|
||||
window.location.href = `/game/${game.id}`;
|
||||
// Force full page reload which terminates all workers, AudioContexts
|
||||
// and WASM threads. Hash is preserved so the SPA routes correctly.
|
||||
window.location.hash = `#/game/${game.id}`;
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
$effect(() => { load(); });
|
||||
|
||||
Reference in New Issue
Block a user