mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-04 05:04:33 +00:00
System: Add taint for memory card time travelling
This commit is contained in:
@@ -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."));
|
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);
|
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();
|
s_state.memory_cards[i]->Reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -703,6 +703,7 @@ std::string_view System::GetTaintDisplayName(Taint taint)
|
|||||||
TRANSLATE_DISAMBIG_NOOP("System", "8MB RAM", "Taint"),
|
TRANSLATE_DISAMBIG_NOOP("System", "8MB RAM", "Taint"),
|
||||||
TRANSLATE_DISAMBIG_NOOP("System", "Cheats", "Taint"),
|
TRANSLATE_DISAMBIG_NOOP("System", "Cheats", "Taint"),
|
||||||
TRANSLATE_DISAMBIG_NOOP("System", "Game Patches", "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");
|
return Host::TranslateToStringView("System", names[static_cast<size_t>(taint)], "Taint");
|
||||||
@@ -718,6 +719,7 @@ const char* System::GetTaintName(Taint taint)
|
|||||||
"RAM8MB",
|
"RAM8MB",
|
||||||
"Cheats",
|
"Cheats",
|
||||||
"Patches",
|
"Patches",
|
||||||
|
"MemoryCardMismatch",
|
||||||
}};
|
}};
|
||||||
|
|
||||||
return names[static_cast<size_t>(taint)];
|
return names[static_cast<size_t>(taint)];
|
||||||
@@ -4933,8 +4935,8 @@ void System::WarnAboutStateTaints(u32 state_taints)
|
|||||||
|
|
||||||
Host::AddIconOSDMessage(
|
Host::AddIconOSDMessage(
|
||||||
OSDMessageType::Error, "SystemTaintsFromState", ICON_EMOJI_WARNING,
|
OSDMessageType::Error, "SystemTaintsFromState", ICON_EMOJI_WARNING,
|
||||||
TRANSLATE_STR("System", "This save state was created with the following tainted options, and may be unstable. You "
|
TRANSLATE_STR("System", "This save state was created with the following tainted options, and may be unstable.\n"
|
||||||
"will need to reset the system to clear any effects."),
|
"You must save to a memory card and reset the game to clear any effects."),
|
||||||
std::string(messages.view()));
|
std::string(messages.view()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ enum class Taint : u8
|
|||||||
RAM8MB,
|
RAM8MB,
|
||||||
Cheats,
|
Cheats,
|
||||||
Patches,
|
Patches,
|
||||||
|
MemoryCardMismatch,
|
||||||
MaxCount,
|
MaxCount,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user