@@ -243,15 +243,24 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co
|
243 | 243 | isMessagePending = false; |
244 | 244 | |
245 | 245 | std::string user_data_path = savegame_directory; |
| 246 | +#ifdef Q_OS_LINUX |
| 247 | +char* config = getenv("XDG_CONFIG_HOME"); |
| 248 | +if (!config) { |
| 249 | + config = getenv("HOME"); |
| 250 | +strcat(config, "/.config"); |
| 251 | + } |
| 252 | + std::string memcard_path = std::string(config) + "/ppsspp/"; |
| 253 | +#else |
246 | 254 | std::string memcard_path = QDir::homePath().toStdString() + "/.ppsspp/"; |
| 255 | +#endif |
247 | 256 | |
248 | 257 | VFSRegister("", new DirectoryAssetReader("assets/")); |
249 | 258 | VFSRegister("", new DirectoryAssetReader(user_data_path.c_str())); |
250 | 259 | VFSRegister("", new AssetsAssetReader()); |
251 | 260 | |
252 | 261 | g_Config.AddSearchPath(user_data_path); |
253 | 262 | g_Config.AddSearchPath(memcard_path + "PSP/SYSTEM/"); |
254 | | - g_Config.SetDefaultPath(g_Config.memCardDirectory + "PSP/SYSTEM/"); |
| 263 | + g_Config.SetDefaultPath(memcard_path + "PSP/SYSTEM/"); |
255 | 264 | g_Config.Load(); |
256 | 265 | i18nrepo.LoadIni(g_Config.sLanguageIni); |
257 | 266 | |
@@ -305,7 +314,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co
|
305 | 314 | g_Config.currentDirectory = QDir::homePath().toStdString(); |
306 | 315 | } |
307 | 316 | |
308 | | - g_Config.memCardDirectory = QDir::homePath().toStdString() + "/.ppsspp/"; |
| 317 | + g_Config.memCardDirectory = memcard_path; |
309 | 318 | |
310 | 319 | #if defined(Q_OS_LINUX) |
311 | 320 | std::string program_path = QCoreApplication::applicationDirPath().toStdString(); |
|