Improve savestates support in AX and AXWii

This commit is contained in:
Pierre Bourdon 2012-11-28 03:31:46 +01:00
parent f11a40f858
commit 4cf2856284
3 changed files with 35 additions and 4 deletions

View File

@ -628,11 +628,26 @@ void CUCode_AX::Update(int cycles)
}
}
void CUCode_AX::DoAXState(PointerWrap& p)
{
p.Do(m_cmdlist);
p.Do(m_cmdlist_size);
p.Do(m_samples_left);
p.Do(m_samples_right);
p.Do(m_samples_surround);
p.Do(m_samples_auxA_left);
p.Do(m_samples_auxA_right);
p.Do(m_samples_auxA_surround);
p.Do(m_samples_auxB_left);
p.Do(m_samples_auxB_right);
p.Do(m_samples_auxB_surround);
}
void CUCode_AX::DoState(PointerWrap& p)
{
std::lock_guard<std::mutex> lk(m_processing);
// TODO
DoStateShared(p);
DoAXState(p);
}

View File

@ -140,6 +140,9 @@ protected:
void SendAUXAndMix(u32 main_auxa_up, u32 auxb_s_up, u32 main_l_dl,
u32 main_r_dl, u32 auxb_l_dl, u32 auxb_r_dl);
// Handle save states for main AX.
void DoAXState(PointerWrap& p);
private:
enum CmdType
{

View File

@ -364,7 +364,20 @@ void CUCode_AXWii::DoState(PointerWrap &p)
{
std::lock_guard<std::mutex> lk(m_processing);
// TODO
DoStateShared(p);
DoAXState(p);
p.Do(m_samples_auxC_left);
p.Do(m_samples_auxC_right);
p.Do(m_samples_auxC_surround);
p.Do(m_samples_wm0);
p.Do(m_samples_wm1);
p.Do(m_samples_wm2);
p.Do(m_samples_wm3);
p.Do(m_samples_aux0);
p.Do(m_samples_aux1);
p.Do(m_samples_aux2);
p.Do(m_samples_aux3);
}