From 09127831583f5fbb6e09b8a5165080431636eb61 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Thu, 15 Jan 2026 15:39:11 +1000 Subject: [PATCH] System: Add taint for memory card time travelling --- src/core/pad.cpp | 1 + src/core/system.cpp | 6 ++++-- src/core/system.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/pad.cpp b/src/core/pad.cpp index 30c497678..66952aee1 100644 --- a/src/core/pad.cpp +++ b/src/core/pad.cpp @@ -289,6 +289,7 @@ bool Pad::DoStateMemcard(StateWrapper& sw, u32 i, bool is_memory_state) TRANSLATE_STR("Pad", "Simulating replugging. The game may not be able to handle this.")); WARNING_LOG("Memory card {} data mismatch. Using current data via instant-replugging.", i + 1u); + System::SetTaint(System::Taint::MemoryCardMismatch); s_state.memory_cards[i]->Reset(); } } diff --git a/src/core/system.cpp b/src/core/system.cpp index 09791fe94..a1431ce40 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -703,6 +703,7 @@ std::string_view System::GetTaintDisplayName(Taint taint) TRANSLATE_DISAMBIG_NOOP("System", "8MB RAM", "Taint"), TRANSLATE_DISAMBIG_NOOP("System", "Cheats", "Taint"), TRANSLATE_DISAMBIG_NOOP("System", "Game Patches", "Taint"), + TRANSLATE_DISAMBIG_NOOP("System", "Memory Card Mismatch", "Taint"), }}; return Host::TranslateToStringView("System", names[static_cast(taint)], "Taint"); @@ -718,6 +719,7 @@ const char* System::GetTaintName(Taint taint) "RAM8MB", "Cheats", "Patches", + "MemoryCardMismatch", }}; return names[static_cast(taint)]; @@ -4933,8 +4935,8 @@ void System::WarnAboutStateTaints(u32 state_taints) Host::AddIconOSDMessage( OSDMessageType::Error, "SystemTaintsFromState", ICON_EMOJI_WARNING, - TRANSLATE_STR("System", "This save state was created with the following tainted options, and may be unstable. You " - "will need to reset the system to clear any effects."), + TRANSLATE_STR("System", "This save state was created with the following tainted options, and may be unstable.\n" + "You must save to a memory card and reset the game to clear any effects."), std::string(messages.view())); } diff --git a/src/core/system.h b/src/core/system.h index f5e61ddb4..d2482a52c 100644 --- a/src/core/system.h +++ b/src/core/system.h @@ -121,6 +121,7 @@ enum class Taint : u8 RAM8MB, Cheats, Patches, + MemoryCardMismatch, MaxCount, };