mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Replace Path::ToVisualString with GetFriendlyPath which shortens. Much better on iOS
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
+2
-1
@@ -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("<!--upload-->") != 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()) {
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
+2
-2
@@ -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_);
|
||||
|
||||
+1
-1
@@ -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();
|
||||
|
||||
@@ -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))));
|
||||
|
||||
+2
-1
@@ -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_) {
|
||||
|
||||
Reference in New Issue
Block a user