mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
DSPHLE: Don't restore the last UCode when the crc doesn't match
This commit is contained in:
parent
fa04e5a7d3
commit
b7f62b7a37
@ -79,15 +79,16 @@ void DSPHLE::SwapUCode(u32 crc)
|
|||||||
{
|
{
|
||||||
m_mail_handler.Clear();
|
m_mail_handler.Clear();
|
||||||
|
|
||||||
if (m_last_ucode == nullptr)
|
if (m_last_ucode && UCodeInterface::GetCRC(m_last_ucode.get()) == crc)
|
||||||
{
|
{
|
||||||
m_last_ucode = std::move(m_ucode);
|
m_ucode = std::move(m_last_ucode);
|
||||||
m_ucode = UCodeFactory(crc, this, m_wii);
|
|
||||||
m_ucode->Initialize();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_ucode = std::move(m_last_ucode);
|
if (!m_last_ucode)
|
||||||
|
m_last_ucode = std::move(m_ucode);
|
||||||
|
m_ucode = UCodeFactory(crc, this, m_wii);
|
||||||
|
m_ucode->Initialize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user