mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
WII_IPC: Fix reregistering CoreTiming callback multiple times.
Separate state reset from Init().
This commit is contained in:
parent
17c34ae0b1
commit
f15e4fb35e
@ -113,7 +113,7 @@ void DoState(PointerWrap& p)
|
|||||||
p.Do(sensorbar_power);
|
p.Do(sensorbar_power);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Init()
|
static void InitState()
|
||||||
{
|
{
|
||||||
ctrl = CtrlRegister();
|
ctrl = CtrlRegister();
|
||||||
ppc_msg = 0;
|
ppc_msg = 0;
|
||||||
@ -127,14 +127,18 @@ void Init()
|
|||||||
sensorbar_power = 0;
|
sensorbar_power = 0;
|
||||||
|
|
||||||
ppc_irq_masks |= INT_CAUSE_IPC_BROADWAY;
|
ppc_irq_masks |= INT_CAUSE_IPC_BROADWAY;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Init()
|
||||||
|
{
|
||||||
|
InitState();
|
||||||
updateInterrupts = CoreTiming::RegisterEvent("IPCInterrupt", UpdateInterrupts);
|
updateInterrupts = CoreTiming::RegisterEvent("IPCInterrupt", UpdateInterrupts);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
INFO_LOG(WII_IPC, "Resetting ...");
|
INFO_LOG(WII_IPC, "Resetting ...");
|
||||||
Init();
|
InitState();
|
||||||
WII_IPC_HLE_Interface::Reset();
|
WII_IPC_HLE_Interface::Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user