Fix titles in savedata manager (remove linebreaks)

Fixes #20106
This commit is contained in:
Henrik Rydgård committed 2025-03-27 14:46:44 +01:00
1 parent ae7586e313
commit 4e4866d1cd
3 files changed
+17 -1

No files matched your search

+4 -1
View File
@@ -698,7 +698,10 @@ UI::EventReturn SavedataScreen::OnSavedataButtonClick(UI::EventParams &e) {
if (!ginfo->Ready(GameInfoFlags::PARAM_SFO)) {
return UI::EVENT_DONE;
}
SavedataPopupScreen *popupScreen = new SavedataPopupScreen(gamePath_, Path(e.s), ginfo->GetTitle());
// Sanitize the title.
std::string title = SanitizeString(ginfo->GetTitle(), StringRestriction::NoLineBreaksOrSpecials, 0, 200);
SavedataPopupScreen *popupScreen = new SavedataPopupScreen(gamePath_, Path(e.s), title);
if (e.v) {
popupScreen->SetPopupOrigin(e.v);
}