mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-25 03:21:36 +02:00
AchievementManager - Fix Gamecube Bulk Copy
The memory copy algorithm (only needed for RetroAchievements devs) was broken for Gamecube as it assumed EXRAM size was zero when in reality it's using ARAM. For the time being, we do not need to use or access ARAM so instead this sets that value to zero for Gamecube titles.
This commit is contained in:
@ -329,11 +329,12 @@ void AchievementManager::DoFrame()
|
||||
if (!system)
|
||||
return;
|
||||
Core::CPUThreadGuard thread_guard(*system);
|
||||
u32 mem2_size = system->GetMemory().GetExRamSizeReal();
|
||||
u32 mem2_size = (system->IsWii()) ? system->GetMemory().GetExRamSizeReal() : 0;
|
||||
if (m_cloned_memory.size() != MEM1_SIZE + mem2_size)
|
||||
m_cloned_memory.resize(MEM1_SIZE + mem2_size);
|
||||
system->GetMemory().CopyFromEmu(m_cloned_memory.data(), 0, MEM1_SIZE);
|
||||
system->GetMemory().CopyFromEmu(m_cloned_memory.data() + MEM1_SIZE, MEM2_START, mem2_size);
|
||||
if (mem2_size > 0)
|
||||
system->GetMemory().CopyFromEmu(m_cloned_memory.data() + MEM1_SIZE, MEM2_START, mem2_size);
|
||||
}
|
||||
#endif // RC_CLIENT_SUPPORTS_RAINTEGRATION
|
||||
std::lock_guard lg{m_lock};
|
||||
|
Reference in New Issue
Block a user