diff --git a/core/upstream/dolphin_web_core.cpp b/core/upstream/dolphin_web_core.cpp index 19dbd34..5b29ce0 100644 --- a/core/upstream/dolphin_web_core.cpp +++ b/core/upstream/dolphin_web_core.cpp @@ -64,6 +64,7 @@ #include "Core/System.h" #include "InputCommon/ControllerInterface/ControllerInterface.h" +#include "InputCommon/ControllerInterface/PlayAgain/PlayAgainWiimote.h" #include "VideoCommon/Fifo.h" #include "VideoCommon/Statistics.h" @@ -937,6 +938,9 @@ void EnsureRuntime() Pad::Initialize(); Pad::InitializeGBA(); Keyboard::Initialize(); + // PlayAgain: the four emulated Wii Remotes, mapped to the page-fed devices + // (InputCommon/ControllerInterface/PlayAgain). GameCube pads keep the direct pad path. + ciface::PlayAgain::InitializeWiimotes(); // ยง27 savestate-load backend resync. Probe evidence: after // State::Load the WebGPU command-ring producer (the dual-core GPU diff --git a/src/upstream-discio-worker.js b/src/upstream-discio-worker.js index 9f47c57..9ddc8fe 100644 --- a/src/upstream-discio-worker.js +++ b/src/upstream-discio-worker.js @@ -3582,7 +3582,11 @@ async function loadCore({ type: "direct-pad", buffer: moduleInstance.HEAPU8.buffer, offset: moduleInstance._DolphinWeb_DirectPadBlock() >>> 0, - layout: moduleInstance._DolphinWeb_DirectPadLayout() >>> 0 + layout: moduleInstance._DolphinWeb_DirectPadLayout() >>> 0, + // PlayAgain Wii Remotes (PlayAgainWiimote.cpp): their block in the same memory. + paWiimote: typeof moduleInstance._pa_wiimote_block === "function" + ? { offset: moduleInstance._pa_wiimote_block() >>> 0, layout: moduleInstance._pa_wiimote_layout() >>> 0 } + : null }); } harnessVideoBackend = videoBackend;