mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 19:34:39 +01:00
Hide account path in friendly path. There is limited space to print out a full path.
This commit is contained in:
1 parent
a54d58f8e3
commit
b04f2d4c45
1 file changed
+15
+15
@@ -1,7 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <vector>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "file/file_util.h"
|
||||
|
||||
@@ -25,6 +27,19 @@ public:
|
||||
}
|
||||
std::string GetFriendlyPath() {
|
||||
std::string str = GetPath();
|
||||
#if defined(BLACKBERRY)
|
||||
char* home = getenv("PERIMETER_HOME");
|
||||
if (!strncmp(str.c_str(), home, strlen(home))) {
|
||||
str = str.substr(strlen(home));
|
||||
str.insert(0, 1, '~');
|
||||
}
|
||||
#elif defined(__linux)
|
||||
char* home = getenv("HOME");
|
||||
if (!strncmp(str.c_str(), home, strlen(home))) {
|
||||
str = str.substr(strlen(home));
|
||||
str.insert(0, 1, '~');
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
#ifdef ANDROID
|
||||
if (!memcmp(str.c_str(), g_Config.memCardDirectory.c_str(), g_Config.memCardDirectory.size()))
|
||||
|
||||
Reference in new issue
Block a user