summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-11-05 05:23:32 +0100
committerbunnei <bunneidev@gmail.com>2016-12-22 05:29:12 +0100
commit707cc66362e613925bbdd0c2abed7959a42decad (patch)
tree618b8063254836feb53c1bcd4e63e283fe95a7f5 /src
parentcore: Consolidate top-level system state into a singleton. (diff)
downloadyuzu-707cc66362e613925bbdd0c2abed7959a42decad.tar
yuzu-707cc66362e613925bbdd0c2abed7959a42decad.tar.gz
yuzu-707cc66362e613925bbdd0c2abed7959a42decad.tar.bz2
yuzu-707cc66362e613925bbdd0c2abed7959a42decad.tar.lz
yuzu-707cc66362e613925bbdd0c2abed7959a42decad.tar.xz
yuzu-707cc66362e613925bbdd0c2abed7959a42decad.tar.zst
yuzu-707cc66362e613925bbdd0c2abed7959a42decad.zip
Diffstat (limited to 'src')
-rw-r--r--src/common/common_paths.h18
-rw-r--r--src/common/file_util.cpp52
-rw-r--r--src/common/file_util.h20
3 files changed, 3 insertions, 87 deletions
diff --git a/src/common/common_paths.h b/src/common/common_paths.h
index 37304d236..b56105306 100644
--- a/src/common/common_paths.h
+++ b/src/common/common_paths.h
@@ -32,22 +32,10 @@
// Subdirs in the User dir returned by GetUserPath(D_USER_IDX)
#define CONFIG_DIR "config"
-#define GAMECONFIG_DIR "game_config"
-#define MAPS_DIR "maps"
#define CACHE_DIR "cache"
#define SDMC_DIR "sdmc"
#define NAND_DIR "nand"
#define SYSDATA_DIR "sysdata"
-#define SHADERCACHE_DIR "shader_cache"
-#define STATESAVES_DIR "state_saves"
-#define SCREENSHOTS_DIR "screenShots"
-#define DUMP_DIR "dump"
-#define DUMP_TEXTURES_DIR "textures"
-#define DUMP_FRAMES_DIR "frames"
-#define DUMP_AUDIO_DIR "audio"
-#define LOGS_DIR "logs"
-#define SHADERS_DIR "shaders"
-#define SYSCONF_DIR "sysconf"
// Filenames
// Files in the directory returned by GetUserPath(D_CONFIG_IDX)
@@ -57,9 +45,3 @@
// Sys files
#define SHARED_FONT "shared_font.bin"
-
-// Files in the directory returned by GetUserPath(D_LOGS_IDX)
-#define MAIN_LOG "emu.log"
-
-// Files in the directory returned by GetUserPath(D_SYSCONF_IDX)
-#define SYSCONF "SYSCONF"
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index c618495f7..5ab938a24 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -697,6 +697,9 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string& new
paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP;
paths[D_CACHE_IDX] = paths[D_USER_IDX] + CACHE_DIR DIR_SEP;
+ paths[D_SDMC_IDX] = paths[D_USER_IDX] + SDMC_DIR DIR_SEP;
+ paths[D_NAND_IDX] = paths[D_USER_IDX] + NAND_DIR DIR_SEP;
+ paths[D_SYSDATA_IDX] = paths[D_USER_IDX] + SYSDATA_DIR DIR_SEP;
#else
if (FileUtil::Exists(ROOT_DIR DIR_SEP USERDATA_DIR)) {
paths[D_USER_IDX] = ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP;
@@ -712,24 +715,8 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string& new
paths[D_CACHE_IDX] = cache_dir + DIR_SEP EMU_DATA_DIR DIR_SEP;
}
#endif
-
- paths[D_GAMECONFIG_IDX] = paths[D_USER_IDX] + GAMECONFIG_DIR DIR_SEP;
- paths[D_MAPS_IDX] = paths[D_USER_IDX] + MAPS_DIR DIR_SEP;
paths[D_SDMC_IDX] = paths[D_USER_IDX] + SDMC_DIR DIR_SEP;
paths[D_NAND_IDX] = paths[D_USER_IDX] + NAND_DIR DIR_SEP;
- paths[D_SYSDATA_IDX] = paths[D_USER_IDX] + SYSDATA_DIR DIR_SEP;
- paths[D_SHADERCACHE_IDX] = paths[D_USER_IDX] + SHADERCACHE_DIR DIR_SEP;
- paths[D_SHADERS_IDX] = paths[D_USER_IDX] + SHADERS_DIR DIR_SEP;
- paths[D_STATESAVES_IDX] = paths[D_USER_IDX] + STATESAVES_DIR DIR_SEP;
- paths[D_SCREENSHOTS_IDX] = paths[D_USER_IDX] + SCREENSHOTS_DIR DIR_SEP;
- paths[D_DUMP_IDX] = paths[D_USER_IDX] + DUMP_DIR DIR_SEP;
- paths[D_DUMPFRAMES_IDX] = paths[D_DUMP_IDX] + DUMP_FRAMES_DIR DIR_SEP;
- paths[D_DUMPAUDIO_IDX] = paths[D_DUMP_IDX] + DUMP_AUDIO_DIR DIR_SEP;
- paths[D_DUMPTEXTURES_IDX] = paths[D_DUMP_IDX] + DUMP_TEXTURES_DIR DIR_SEP;
- paths[D_LOGS_IDX] = paths[D_USER_IDX] + LOGS_DIR DIR_SEP;
- paths[F_DEBUGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + DEBUGGER_CONFIG;
- paths[F_LOGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + LOGGER_CONFIG;
- paths[F_MAINLOG_IDX] = paths[D_LOGS_IDX] + MAIN_LOG;
}
if (!newPath.empty()) {
@@ -743,48 +730,15 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string& new
switch (DirIDX) {
case D_ROOT_IDX:
paths[D_USER_IDX] = paths[D_ROOT_IDX] + DIR_SEP;
- paths[D_SYSCONF_IDX] = paths[D_USER_IDX] + SYSCONF_DIR + DIR_SEP;
- paths[F_SYSCONF_IDX] = paths[D_SYSCONF_IDX] + SYSCONF;
break;
case D_USER_IDX:
paths[D_USER_IDX] = paths[D_ROOT_IDX] + DIR_SEP;
paths[D_CONFIG_IDX] = paths[D_USER_IDX] + CONFIG_DIR DIR_SEP;
- paths[D_GAMECONFIG_IDX] = paths[D_USER_IDX] + GAMECONFIG_DIR DIR_SEP;
- paths[D_MAPS_IDX] = paths[D_USER_IDX] + MAPS_DIR DIR_SEP;
paths[D_CACHE_IDX] = paths[D_USER_IDX] + CACHE_DIR DIR_SEP;
paths[D_SDMC_IDX] = paths[D_USER_IDX] + SDMC_DIR DIR_SEP;
paths[D_NAND_IDX] = paths[D_USER_IDX] + NAND_DIR DIR_SEP;
- paths[D_SHADERCACHE_IDX] = paths[D_USER_IDX] + SHADERCACHE_DIR DIR_SEP;
- paths[D_SHADERS_IDX] = paths[D_USER_IDX] + SHADERS_DIR DIR_SEP;
- paths[D_STATESAVES_IDX] = paths[D_USER_IDX] + STATESAVES_DIR DIR_SEP;
- paths[D_SCREENSHOTS_IDX] = paths[D_USER_IDX] + SCREENSHOTS_DIR DIR_SEP;
- paths[D_DUMP_IDX] = paths[D_USER_IDX] + DUMP_DIR DIR_SEP;
- paths[D_DUMPFRAMES_IDX] = paths[D_DUMP_IDX] + DUMP_FRAMES_DIR DIR_SEP;
- paths[D_DUMPAUDIO_IDX] = paths[D_DUMP_IDX] + DUMP_AUDIO_DIR DIR_SEP;
- paths[D_DUMPTEXTURES_IDX] = paths[D_DUMP_IDX] + DUMP_TEXTURES_DIR DIR_SEP;
- paths[D_LOGS_IDX] = paths[D_USER_IDX] + LOGS_DIR DIR_SEP;
- paths[D_SYSCONF_IDX] = paths[D_USER_IDX] + SYSCONF_DIR DIR_SEP;
- paths[F_EMUCONFIG_IDX] = paths[D_CONFIG_IDX] + EMU_CONFIG;
- paths[F_DEBUGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + DEBUGGER_CONFIG;
- paths[F_LOGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + LOGGER_CONFIG;
- paths[F_MAINLOG_IDX] = paths[D_LOGS_IDX] + MAIN_LOG;
break;
-
- case D_CONFIG_IDX:
- paths[F_EMUCONFIG_IDX] = paths[D_CONFIG_IDX] + EMU_CONFIG;
- paths[F_DEBUGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + DEBUGGER_CONFIG;
- paths[F_LOGGERCONFIG_IDX] = paths[D_CONFIG_IDX] + LOGGER_CONFIG;
- break;
-
- case D_DUMP_IDX:
- paths[D_DUMPFRAMES_IDX] = paths[D_DUMP_IDX] + DUMP_FRAMES_DIR DIR_SEP;
- paths[D_DUMPAUDIO_IDX] = paths[D_DUMP_IDX] + DUMP_AUDIO_DIR DIR_SEP;
- paths[D_DUMPTEXTURES_IDX] = paths[D_DUMP_IDX] + DUMP_TEXTURES_DIR DIR_SEP;
- break;
-
- case D_LOGS_IDX:
- paths[F_MAINLOG_IDX] = paths[D_LOGS_IDX] + MAIN_LOG;
}
}
diff --git a/src/common/file_util.h b/src/common/file_util.h
index ac58607c5..94adfcd7e 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -21,31 +21,11 @@ enum {
D_USER_IDX,
D_ROOT_IDX,
D_CONFIG_IDX,
- D_GAMECONFIG_IDX,
- D_MAPS_IDX,
D_CACHE_IDX,
- D_SHADERCACHE_IDX,
- D_SHADERS_IDX,
- D_STATESAVES_IDX,
- D_SCREENSHOTS_IDX,
D_SDMC_IDX,
D_NAND_IDX,
D_SYSDATA_IDX,
- D_HIRESTEXTURES_IDX,
- D_DUMP_IDX,
- D_DUMPFRAMES_IDX,
- D_DUMPAUDIO_IDX,
- D_DUMPTEXTURES_IDX,
- D_DUMPDSP_IDX,
D_LOGS_IDX,
- D_SYSCONF_IDX,
- F_EMUCONFIG_IDX,
- F_DEBUGGERCONFIG_IDX,
- F_LOGGERCONFIG_IDX,
- F_MAINLOG_IDX,
- F_RAMDUMP_IDX,
- F_ARAMDUMP_IDX,
- F_SYSCONF_IDX,
NUM_PATH_INDICES
};