diff --git a/Core/Loaders.cpp b/Core/Loaders.cpp index 43c70acf4f..93f6460369 100644 --- a/Core/Loaders.cpp +++ b/Core/Loaders.cpp @@ -344,7 +344,7 @@ bool UmdReplace(const Path &filepath, FileLoader **fileLoader, std::string &erro FileLoader *loadedFile = ConstructFileLoader(filepath); if (!loadedFile || !loadedFile->Exists()) { - error = loadedFile ? (loadedFile->GetPath().ToVisualString() + " doesn't exist") : "no loaded file"; + error = loadedFile ? (GetFriendlyPath(loadedFile->GetPath()) + " doesn't exist") : "no loaded file"; delete loadedFile; return false; } diff --git a/Core/WebServer.cpp b/Core/WebServer.cpp index b3d4e4f02b..05d0c428d2 100644 --- a/Core/WebServer.cpp +++ b/Core/WebServer.cpp @@ -36,6 +36,7 @@ #include "Common/System/System.h" #include "Common/System/OSD.h" #include "Core/Util/RecentFiles.h" +#include "Core/Util/PathUtil.h" #include "Core/Config.h" #include "Core/Debugger/WebSocket.h" #include "Core/WebServer.h" @@ -407,7 +408,7 @@ static bool ServeAssetFile(const http::ServerRequest &request) { // This is a gross, gross hack to have here in ServeAssetFile, but oh well. if (mimeType == "text/html") { if (html.find("") != std::string::npos) { - std::string uploadPath = g_uploadPath.ToVisualString(); + std::string uploadPath = GetFriendlyPath(g_uploadPath); std::string deviceName = System_GetProperty(SYSPROP_NAME); std::string computerName = System_GetProperty(SYSPROP_COMPUTER_NAME); if (!computerName.empty()) { diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 5a3049e992..ced8dc1eef 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -120,7 +120,7 @@ void SaveFrameDump() { if (System_GetPropertyBool(SYSPROP_CAN_SHOW_FILE)) { System_ShowFileInFolder(dumpPath); } else { - g_OSD.Show(OSDType::MESSAGE_SUCCESS, dumpPath.ToVisualString(), 7.0f); + g_OSD.Show(OSDType::MESSAGE_SUCCESS, GetFriendlyPath(dumpPath), 7.0f); } }); } diff --git a/UI/DeveloperToolsScreen.cpp b/UI/DeveloperToolsScreen.cpp index 821d6fb0a7..edfc395307 100644 --- a/UI/DeveloperToolsScreen.cpp +++ b/UI/DeveloperToolsScreen.cpp @@ -36,6 +36,7 @@ #include "Core/Core.h" #include "Core/System.h" #include "Core/WebServer.h" +#include "Core/Util/PathUtil.h" #include "UI/GPUDriverTestScreen.h" #include "UI/DeveloperToolsScreen.h" #include "UI/DevScreens.h" @@ -654,7 +655,7 @@ void DeveloperToolsScreen::OnOpenTexturesIniFile(UI::EventParams &e) { } else { // Can't do much here, let's send a "toast" so the user sees that something happened. auto dev = GetI18NCategory(I18NCat::DEVELOPER); - System_Toast((generatedFilename.ToVisualString() + ": " + dev->T_cstr("Texture ini file created")).c_str()); + System_Toast((GetFriendlyPath(generatedFilename) + ": " + dev->T_cstr("Texture ini file created")).c_str()); } hasTexturesIni_ = HasIni::YES; diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 0956ac2dab..a9d554445f 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -57,6 +57,7 @@ using namespace std::placeholders; #include "Core/KeyMap.h" #include "Core/MemFault.h" #include "Core/Reporting.h" +#include "Core/Util/PathUtil.h" #include "Core/System.h" #include "GPU/Common/PresentationCommon.h" #include "Core/FileSystems/VirtualDiscFileSystem.h" @@ -105,7 +106,6 @@ using namespace std::placeholders; #include "ext/imgui/imgui_impl_thin3d.h" #include "ext/imgui/imgui_impl_platform.h" -#include "Core/Reporting.h" #if PPSSPP_PLATFORM(WINDOWS) && !PPSSPP_PLATFORM(UWP) #include "Windows/MainWindow.h" @@ -1461,7 +1461,7 @@ void EmuScreen::update() { if (errorMessage_.size()) { auto err = GetI18NCategory(I18NCat::ERRORS); auto di = GetI18NCategory(I18NCat::DIALOG); - std::string errLoadingFile = gamePath_.ToVisualString() + "\n\n"; + std::string errLoadingFile = GetFriendlyPath(gamePath_) + "\n\n"; errLoadingFile.append(err->T("Error loading file", "Could not load game")); errLoadingFile.append("\n"); errLoadingFile.append(errorMessage_); diff --git a/UI/GameScreen.cpp b/UI/GameScreen.cpp index 744343d67a..aa7aa736f0 100644 --- a/UI/GameScreen.cpp +++ b/UI/GameScreen.cpp @@ -567,7 +567,7 @@ void GameScreen::OnDeleteGame(UI::EventParams &e) { auto ga = GetI18NCategory(I18NCat::GAME); std::string prompt; prompt = di->T("DeleteConfirmGame", "Do you really want to delete this game\nfrom your device? You can't undo this."); - prompt += "\n\n" + gamePath_.ToVisualString(g_Config.memStickDirectory.c_str()); + prompt += "\n\n" + GetFriendlyPath(gamePath_); const bool trashAvailable = System_GetPropertyBool(SYSPROP_HAS_TRASH_BIN); Path gamePath = gamePath_; ScreenManager *sm = screenManager(); diff --git a/UI/RemoteISOScreen.cpp b/UI/RemoteISOScreen.cpp index 264e1a5dfc..a4ce24d843 100644 --- a/UI/RemoteISOScreen.cpp +++ b/UI/RemoteISOScreen.cpp @@ -328,7 +328,7 @@ void RemoteISOScreen::CreateConnectTab(UI::ViewGroup *tab) { if ((RemoteISOShareType)g_Config.iRemoteISOShareType == RemoteISOShareType::RECENT) { tab->Add(new TextView(ri->T("RemoteISODesc", "Games in your recent list will be shared"), new LinearLayoutParams(Margins(12, 5, 0, 5)))); } else { - tab->Add(new TextView(std::string(ri->T("Share Games (Server)")) + ": " + Path(g_Config.sRemoteISOSharedDir).ToVisualString(), new LinearLayoutParams(Margins(12, 5, 0, 5)))); + tab->Add(new TextView(std::string(ri->T("Share Games (Server)")) + ": " + GetFriendlyPath(Path(g_Config.sRemoteISOSharedDir)), new LinearLayoutParams(Margins(12, 5, 0, 5)))); } tab->Add(new TextView(ri->T("RemoteISOWifi", "Note: Connect both devices to the same wifi"), new LinearLayoutParams(Margins(12, 5, 0, 5)))); firewallWarning_ = tab->Add(new TextView(ri->T("RemoteISOWinFirewall", "WARNING: Windows Firewall is blocking sharing"), new LinearLayoutParams(Margins(12, 5, 0, 5)))); diff --git a/UI/UploadScreen.cpp b/UI/UploadScreen.cpp index 9f8e29242e..7e1de652b2 100644 --- a/UI/UploadScreen.cpp +++ b/UI/UploadScreen.cpp @@ -6,6 +6,7 @@ #include "Common/Data/Text/Parsers.h" #include "Common/Data/Text/I18n.h" #include "Core/WebServer.h" +#include "Core/Util/PathUtil.h" #include "UI/UploadScreen.h" #include "UI/MiscViews.h" @@ -33,7 +34,7 @@ void UploadScreen::CreateDialogViews(UI::ViewGroup *root) { LinearLayout *container = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(500, FILL_PARENT, 0.0f, UI::Gravity::G_HCENTER, Margins(10))); root->Add(container); - container->Add(new TextWithImage(ImageID("I_FOLDER_UPLOAD"), targetFolder_.ToVisualString())); + container->Add(new TextWithImage(ImageID("I_FOLDER_UPLOAD"), GetFriendlyPath(targetFolder_))); container->Add(new Spacer(20.0f)); if (prevRunning_) {