diff --git a/Core/Config.cpp b/Core/Config.cpp index 23e273e392..26607420e5 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -71,8 +71,8 @@ static const std::string_view logSectionName = "LogDebug"; static const std::string_view logSectionName = "Log"; #endif -static const std::vector defaultProAdhocServerList = { - "socom.cc", "psp.gameplayer.club", // TODO: Add some saved recent history too? +const std::vector defaultProAdhocServerList = { + "socom.cc", "psp.gameplayer.club", }; std::string GPUBackendToString(GPUBackend backend) { diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 36a52f11a5..2b26d72287 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -2018,10 +2018,11 @@ void EmuScreen::AutoLoadSaveState() { SaveState::LoadSlot(gamePrefix, autoSlot, [this, autoSlot](SaveState::Status status, std::string_view message) { AfterSaveStateAction(status, message); auto sy = GetI18NCategory(I18NCat::SYSTEM); - std::string msg = std::string(sy->T("Auto Load Savestate")) + ": " + StringFromFormat("%d", autoSlot); - g_OSD.Show(OSDType::MESSAGE_SUCCESS, msg); if (status == SaveState::Status::FAILURE) { autoLoadFailed_ = true; + } else { + std::string msg = std::string(sy->T("Auto Load Savestate")) + ": " + StringFromFormat("%d", autoSlot); + g_OSD.Show(OSDType::MESSAGE_SUCCESS, msg, 2.0f, "autoload"); } }); g_Config.iCurrentStateSlot = autoSlot; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index a51f117870..17709986d4 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1038,7 +1038,7 @@ void GameSettingsScreen::CreateNetworkingSettings(UI::ViewGroup *networkingSetti networkingSettings->Add(new CheckBox(&g_Config.bEnableWlan, n->T("Enable networking", "Enable networking/wlan (beta)"))); networkingSettings->Add(new MacAddressChooser(GetRequesterToken(), gamePath_, &g_Config.sMACAddress, n->T("Change Mac Address"), screenManager())); - static const char* wlanChannels[] = { "Auto", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11" }; + static const char *wlanChannels[] = { "Auto", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11" }; auto wlanChannelChoice = networkingSettings->Add(new PopupMultiChoice(&g_Config.iWlanAdhocChannel, n->T("WLAN Channel"), wlanChannels, 0, ARRAY_SIZE(wlanChannels), I18NCat::NETWORKING, screenManager())); for (int i = 0; i < 4; i++) { wlanChannelChoice->HideChoice(i + 2); diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index 29ab95cfaa..3c19b77913 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -526,7 +526,7 @@ void GamePauseScreen::CreateViews() { if (NetAdhocctl_GetState() >= ADHOCCTL_STATE_CONNECTED) { // Awkwardly re-using a string here - saveDataScrollItems->Add(new TextView(std::string(nw->T("AdHoc server")) + ": " + std::string(nw->T("Connected")))); + saveDataScrollItems->Add(new TextView(ApplySafeSubstitutions("%1: %2 (%3)", nw->T("AdHoc server"), nw->T("Connected"), g_Config.sProAdhocServer))); } } diff --git a/Windows/MainWindowMenu.cpp b/Windows/MainWindowMenu.cpp index 3eddc6cef0..f1861b8719 100644 --- a/Windows/MainWindowMenu.cpp +++ b/Windows/MainWindowMenu.cpp @@ -135,7 +135,8 @@ namespace MainWindow { MENUITEMINFO menuInfo{ sizeof(menuInfo), MIIM_STRING }; std::string retVal; if (GetMenuItemInfo(menu, menuID, MF_BYCOMMAND, &menuInfo) != FALSE) { - std::vector buffer(menuInfo.cch + 1); + menuInfo.cch++; // account for null terminator + std::vector buffer(menuInfo.cch); menuInfo.dwTypeData = buffer.data(); GetMenuItemInfo(menu, menuID, MF_BYCOMMAND, &menuInfo); retVal = ConvertWStringToUTF8(menuInfo.dwTypeData); // note, this is buffer.