From 61a7e2fa648c5739ab2653409fc8671da54af5e9 Mon Sep 17 00:00:00 2001 From: Corwin Date: Sat, 6 Apr 2024 02:34:39 +0100 Subject: [PATCH] force full reset which can get audio working on mobile --- website/app/src/App.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/app/src/App.tsx b/website/app/src/App.tsx index df71c83f..42140cce 100644 --- a/website/app/src/App.tsx +++ b/website/app/src/App.tsx @@ -51,6 +51,8 @@ function App() { "agbrswebplayer", ); + const [mgbaId, setMgbaId] = useState(0); + const setVolume = (newVolume: number) => setState({ volume: newVolume, bindings }); const setBindings = (newBindings: Bindings) => @@ -79,7 +81,7 @@ function App() { } if (reset) { - mgbaRef.current?.restart(); + setMgbaId((id) => id + 1); } }; @@ -111,6 +113,7 @@ function App() { )} {isPlaying ? (