Crashfix on memstick screen.

Fixes #18886
This commit is contained in:
Henrik Rydgård 2024-02-24 18:49:57 +07:00
parent d5cfcccbea
commit 5398820867

View File

@ -218,7 +218,7 @@ void MemStickScreen::CreateViews() {
if (choice_ == CHOICE_BROWSE_FOLDER || choice_ == CHOICE_SET_MANUAL) {
UI::View *extraView = nullptr;
if (!g_Config.memStickDirectory.empty()) {
extraView = new TextView(StringFromFormat(" %s: %s", iz->T("Current"), g_Config.memStickDirectory.ToVisualString().c_str()), ALIGN_LEFT, false);
extraView = new TextView(StringFromFormat(" %s: %s", iz->T_cstr("Current"), g_Config.memStickDirectory.ToVisualString().c_str()), ALIGN_LEFT, false);
}
AddExplanation(leftColumn, (MemStickScreen::Choice)choice_, extraView);
}
@ -226,7 +226,7 @@ void MemStickScreen::CreateViews() {
std::string privateString(iz->T("Use App Private Data"));
if (initialSetup_) {
privateString = StringFromFormat("%s (%s)", iz->T("Skip for now"), privateString.c_str());
privateString = StringFromFormat("%s (%s)", iz->T_cstr("Skip for now"), privateString.c_str());
}
leftColumn->Add(new RadioButton(&choice_, CHOICE_PRIVATE_DIRECTORY, privateString))->OnClick.Handle(this, &MemStickScreen::OnChoiceClick);
@ -236,7 +236,7 @@ void MemStickScreen::CreateViews() {
leftColumn->Add(new Spacer(new LinearLayoutParams(FILL_PARENT, 12.0f, 0.0f)));
std::string_view confirmButtonText = nullptr;
std::string_view confirmButtonText = "";
ImageID confirmButtonImage = ImageID::invalid();
switch (choice_) {
case CHOICE_BROWSE_FOLDER: