From a259ed183577862531cea3f52e15cf30e5d35b9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 16 Jul 2023 17:05:08 +0200 Subject: [PATCH] Switch back to rcheevos' upstream version --- .gitmodules | 2 +- Core/RetroAchievements.cpp | 8 ++------ ext/rcheevos | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.gitmodules b/.gitmodules index e1032d0297..2ca84d342b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -46,4 +46,4 @@ url = https://github.com/google/cpu_features.git [submodule "ext/rcheevos"] path = ext/rcheevos - url = https://github.com/hrydgard/rcheevos.git + url = https://github.com/RetroAchievements/rcheevos.git diff --git a/Core/RetroAchievements.cpp b/Core/RetroAchievements.cpp index d8f2fbecfd..7ac6086659 100644 --- a/Core/RetroAchievements.cpp +++ b/Core/RetroAchievements.cpp @@ -161,12 +161,8 @@ static uint32_t read_memory_callback(uint32_t address, uint8_t *buffer, uint32_t WARN_LOG(G3D, "RetroAchievements PeekMemory: Bad address %08x (%d bytes) (%08x was passed in)", address, num_bytes, orig_address); } - // TEMPORARY HACK: rcheevos' handling of bad memory accesses causes a LOT of extra work, since - // for some reason these invalid accesses keeps happening. So we'll temporarily to back to the previous - // behavior of simply returning 0. This is fixed in a PR upstream, not yet merged. - uint32_t temp = 0; - memcpy(buffer, &temp, num_bytes); - return num_bytes; + // This tells rcheevos that the access was bad, which should now be handled properly. + return 0; } Memory::MemcpyUnchecked(buffer, address, num_bytes); diff --git a/ext/rcheevos b/ext/rcheevos index 223df07613..aa6324e886 160000 --- a/ext/rcheevos +++ b/ext/rcheevos @@ -1 +1 @@ -Subproject commit 223df0761313c5c9d9f4d4dc4b5897cf41e7e036 +Subproject commit aa6324e886e12da0cf24dee1cf4e873571f39191