From 4d4a095c76501799767f70120fe86238f3fe8fb4 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Mon, 11 Nov 2019 18:05:53 -0800 Subject: [PATCH] Reset Wiimotes on force stop and when starting MIOS --- Source/Core/Core/Core.cpp | 1 + Source/Core/Core/IOS/MIOS.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 89259a0785..32a3919d35 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -290,6 +290,7 @@ void Stop() // - Hammertime! g_video_backend->Video_ExitLoop(); } + Wiimote::ResetAllWiimotes(); ResetRumble(); #ifdef USE_MEMORYWATCHER diff --git a/Source/Core/Core/IOS/MIOS.cpp b/Source/Core/Core/IOS/MIOS.cpp index c94c2ee957..d7de03d494 100644 --- a/Source/Core/Core/IOS/MIOS.cpp +++ b/Source/Core/Core/IOS/MIOS.cpp @@ -20,6 +20,7 @@ #include "Core/HW/DVD/DVDInterface.h" #include "Core/HW/Memmap.h" #include "Core/HW/SystemTimers.h" +#include "Core/HW/Wiimote.h" #include "Core/Host.h" #include "Core/PowerPC/PPCSymbolDB.h" #include "Core/PowerPC/PowerPC.h" @@ -35,6 +36,7 @@ static void ReinitHardware() // MIOS appears to only reset the DI and the PPC. DVDInterface::Reset(); PowerPC::Reset(); + Wiimote::ResetAllWiimotes(); // Note: this is specific to Dolphin and is required because we initialised it in Wii mode. DSP::Reinit(SConfig::GetInstance().bDSPHLE); DSP::GetDSPEmulator()->Initialize(SConfig::GetInstance().bWii, SConfig::GetInstance().bDSPThread);