Clean up the string type in RequestCallback - somehow was both char* and std::string????

Might be related to #21695
This commit is contained in:
Henrik Rydgård committed 2026-05-18 14:16:34 +02:00
1 parent f4e52d5db5
commit cc0ece038c
19 files changed
+55 -54

No files matched your search

+3 -3
View File
@@ -518,7 +518,7 @@ bool MainScreen::key(const KeyInput &key) {
if (key.flags & KeyInputFlags::DOWN) {
if (key.keyCode == NKCODE_F && (key.flags & KeyInputFlags::MOD_CTRL) && System_GetPropertyBool(SYSPROP_HAS_TEXT_INPUT_DIALOG)) {
auto se = GetI18NCategory(I18NCat::SEARCH);
System_InputBoxGetString(GetRequesterToken(), se->T("Search term"), searchFilter_, false, [&](const std::string &value, int) {
System_InputBoxGetString(GetRequesterToken(), se->T("Search term"), searchFilter_, false, [this](std::string_view value, int) {
searchFilter_ = StripSpaces(value);
searchChanged_ = true;
});
@@ -597,7 +597,7 @@ void MainScreen::update() {
void MainScreen::OnLoadFile(UI::EventParams &e) {
if (System_GetPropertyBool(SYSPROP_HAS_FILE_BROWSER)) {
auto mm = GetI18NCategory(I18NCat::MAINMENU);
System_BrowseForFile(GetRequesterToken(), mm->T("Load"), BrowseFileType::BOOTABLE, [](const std::string &value, int) {
System_BrowseForFile(GetRequesterToken(), mm->T("Load"), BrowseFileType::BOOTABLE, [](std::string_view value, int) {
System_PostUIMessage(UIMessage::REQUEST_GAME_BOOT, value);
});
}
@@ -836,7 +836,7 @@ void UmdReplaceScreen::CreateViews() {
if (System_GetPropertyBool(SYSPROP_HAS_FILE_BROWSER)) {
rightColumnItems->Add(new Choice(mm->T("Load", "Load...")))->OnClick.Add([&](UI::EventParams &e) {
auto mm = GetI18NCategory(I18NCat::MAINMENU);
System_BrowseForFile(GetRequesterToken(), mm->T("Load"), BrowseFileType::BOOTABLE, [this](const std::string &value, int) {
System_BrowseForFile(GetRequesterToken(), mm->T("Load"), BrowseFileType::BOOTABLE, [this](std::string_view value, int) {
__UmdReplace(Path(value));
TriggerFinish(DR_OK);
});