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:
David Alvarez
2026-05-23 19:29:07 +02:00
parent f6a1dccdf2
commit 7f17f4b31e
2 changed files with 8 additions and 33 deletions
+4 -3
View File
@@ -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(); });