From f15e4fb35e5f2b7ed01d2f23b26719b7230c5b90 Mon Sep 17 00:00:00 2001 From: EmptyChaos Date: Sat, 3 Sep 2016 04:54:34 +0000 Subject: [PATCH] WII_IPC: Fix reregistering CoreTiming callback multiple times. Separate state reset from Init(). --- Source/Core/Core/HW/WII_IPC.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/HW/WII_IPC.cpp b/Source/Core/Core/HW/WII_IPC.cpp index 646abb778d..ff24dd3447 100644 --- a/Source/Core/Core/HW/WII_IPC.cpp +++ b/Source/Core/Core/HW/WII_IPC.cpp @@ -113,7 +113,7 @@ void DoState(PointerWrap& p) p.Do(sensorbar_power); } -void Init() +static void InitState() { ctrl = CtrlRegister(); ppc_msg = 0; @@ -127,14 +127,18 @@ void Init() sensorbar_power = 0; ppc_irq_masks |= INT_CAUSE_IPC_BROADWAY; +} +void Init() +{ + InitState(); updateInterrupts = CoreTiming::RegisterEvent("IPCInterrupt", UpdateInterrupts); } void Reset() { INFO_LOG(WII_IPC, "Resetting ..."); - Init(); + InitState(); WII_IPC_HLE_Interface::Reset(); }