diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 386235c807..230bb58d58 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1100,7 +1100,7 @@ UI::EventReturn GameSettingsScreen::OnChangeNickname(UI::EventParams &e) { memset(name, 0, sizeof(name)); if (System_InputBoxGetString("Enter a new PSP nickname", g_Config.sNickName.c_str(), name, name_len)) { - g_Config.sNickName = name; + g_Config.sNickName = StripSpaces(name); } #elif defined(__ANDROID__) System_SendMessage("inputbox", ("nickname:" + g_Config.sNickName).c_str()); @@ -1117,7 +1117,8 @@ UI::EventReturn GameSettingsScreen::OnChangeproAdhocServerAddress(UI::EventParam memset(name, 0, sizeof(name)); if (System_InputBoxGetString("Enter an IP address", g_Config.proAdhocServer.c_str(), name, name_len)) { - g_Config.proAdhocServer = StripSpaces(name); + std::string stripped = StripSpaces(name); + g_Config.proAdhocServer = stripped; } } else @@ -1498,7 +1499,7 @@ UI::EventReturn ProAdhocServerScreen::OnDeleteAllClick(UI::EventParams &e) { } UI::EventReturn ProAdhocServerScreen::OnOKClick(UI::EventParams &e) { - g_Config.proAdhocServer = tempProAdhocServer; + g_Config.proAdhocServer = StripSpaces(tempProAdhocServer); UIScreen::OnBack(e); return UI::EVENT_DONE; } diff --git a/ext/native/ui/ui_screen.cpp b/ext/native/ui/ui_screen.cpp index fd7fcf6783..a8bb3147bc 100644 --- a/ext/native/ui/ui_screen.cpp +++ b/ext/native/ui/ui_screen.cpp @@ -804,7 +804,7 @@ void TextEditPopupScreen::CreatePopupContents(UI::ViewGroup *parent) { void TextEditPopupScreen::OnCompleted(DialogResult result) { if (result == DR_OK) { - *value_ = edit_->GetText(); + *value_ = StripSpaces(edit_->GetText()); EventParams e{}; e.v = edit_; OnChange.Trigger(e);