System: Add taint for memory card time travelling

This commit is contained in:
Stenzek
2026-01-15 15:39:11 +10:00
parent 3bff452022
commit 0912783158
3 changed files with 6 additions and 2 deletions

View File

@@ -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();
}
}

View File

@@ -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<size_t>(taint)], "Taint");
@@ -718,6 +719,7 @@ const char* System::GetTaintName(Taint taint)
"RAM8MB",
"Cheats",
"Patches",
"MemoryCardMismatch",
}};
return names[static_cast<size_t>(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()));
}

View File

@@ -121,6 +121,7 @@ enum class Taint : u8
RAM8MB,
Cheats,
Patches,
MemoryCardMismatch,
MaxCount,
};