Skip to content

Commit

Permalink
Merge pull request #12538 from LillyJadeKatrin/retroachievements-bugfix
Browse files Browse the repository at this point in the history
Reverse endianness of achievement memory peeks
  • Loading branch information
AdmiralCurtiss committed Jan 29, 2024
2 parents 8482a50 + fd99a5d commit 1e2fb41
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Source/Core/Core/AchievementManager.cpp
Expand Up @@ -711,15 +711,17 @@ u32 AchievementManager::MemoryPeeker(u32 address, u32 num_bytes, void* ud)
.value_or(PowerPC::ReadResult<u8>(false, 0u))
.value;
case 2:
return m_system->GetMMU()
.HostTryReadU16(threadguard, address, PowerPC::RequestedAddressSpace::Physical)
.value_or(PowerPC::ReadResult<u16>(false, 0u))
.value;
return Common::swap16(
m_system->GetMMU()
.HostTryReadU16(threadguard, address, PowerPC::RequestedAddressSpace::Physical)
.value_or(PowerPC::ReadResult<u16>(false, 0u))
.value);
case 4:
return m_system->GetMMU()
.HostTryReadU32(threadguard, address, PowerPC::RequestedAddressSpace::Physical)
.value_or(PowerPC::ReadResult<u32>(false, 0u))
.value;
return Common::swap32(
m_system->GetMMU()
.HostTryReadU32(threadguard, address, PowerPC::RequestedAddressSpace::Physical)
.value_or(PowerPC::ReadResult<u32>(false, 0u))
.value);
default:
ASSERT(false);
return 0u;
Expand Down

0 comments on commit 1e2fb41

Please sign in to comment.