mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Disable memory patches in hardcore mode
Memory patches would be an easy way to manipulate the memory needed to calculate achievement logic, so they must be disabled. Riivolution patches that do not affect memory are allowed, as they will be hashed with the game file.
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/IOFile.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Core/Config/AchievementSettings.h"
|
||||
#include "Core/HLE/HLE.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IOS/FS/FileSystem.h"
|
||||
@ -522,6 +523,11 @@ static bool MemoryMatchesAt(const Core::CPUThreadGuard& guard, u32 offset,
|
||||
static void ApplyMemoryPatch(const Core::CPUThreadGuard& guard, u32 offset,
|
||||
const std::vector<u8>& value, const std::vector<u8>& original)
|
||||
{
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
if (::Config::Get(::Config::RA_HARDCORE_ENABLED))
|
||||
return;
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
|
||||
if (value.empty())
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user