mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-24 02:29:20 +01:00
Common: Add "sysdata" to GetUserPath and cleanup.
This commit is contained in:
parent
4cb7a44d4e
commit
5bac72282a
@ -29,19 +29,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Shared data dirs (Sys and shared User for linux)
|
|
||||||
#ifdef _WIN32
|
|
||||||
#define SYSDATA_DIR "sys"
|
|
||||||
#else
|
|
||||||
#ifdef DATA_DIR
|
|
||||||
#define SYSDATA_DIR DATA_DIR "sys"
|
|
||||||
#define SHARED_USER_DIR DATA_DIR USERDATA_DIR DIR_SEP
|
|
||||||
#else
|
|
||||||
#define SYSDATA_DIR "sys"
|
|
||||||
#define SHARED_USER_DIR ROOT_DIR DIR_SEP USERDATA_DIR DIR_SEP
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Dirs in both User and Sys
|
// Dirs in both User and Sys
|
||||||
#define EUR_DIR "EUR"
|
#define EUR_DIR "EUR"
|
||||||
#define USA_DIR "USA"
|
#define USA_DIR "USA"
|
||||||
@ -53,6 +40,7 @@
|
|||||||
#define MAPS_DIR "maps"
|
#define MAPS_DIR "maps"
|
||||||
#define CACHE_DIR "cache"
|
#define CACHE_DIR "cache"
|
||||||
#define SDMC_DIR "sdmc"
|
#define SDMC_DIR "sdmc"
|
||||||
|
#define SYSDATA_DIR "sysdata"
|
||||||
#define SHADERCACHE_DIR "shader_cache"
|
#define SHADERCACHE_DIR "shader_cache"
|
||||||
#define STATESAVES_DIR "state_saves"
|
#define STATESAVES_DIR "state_saves"
|
||||||
#define SCREENSHOTS_DIR "screenShots"
|
#define SCREENSHOTS_DIR "screenShots"
|
||||||
|
@ -676,6 +676,7 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string &new
|
|||||||
paths[D_MAPS_IDX] = paths[D_USER_IDX] + MAPS_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_CACHE_IDX] = paths[D_USER_IDX] + CACHE_DIR DIR_SEP;
|
||||||
paths[D_SDMC_IDX] = paths[D_USER_IDX] + SDMC_DIR DIR_SEP;
|
paths[D_SDMC_IDX] = paths[D_USER_IDX] + SDMC_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_SHADERCACHE_IDX] = paths[D_USER_IDX] + SHADERCACHE_DIR DIR_SEP;
|
||||||
paths[D_SHADERS_IDX] = paths[D_USER_IDX] + SHADERS_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_STATESAVES_IDX] = paths[D_USER_IDX] + STATESAVES_DIR DIR_SEP;
|
||||||
@ -753,19 +754,6 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string &new
|
|||||||
return paths[DirIDX];
|
return paths[DirIDX];
|
||||||
}
|
}
|
||||||
|
|
||||||
//std::string GetThemeDir(const std::string& theme_name)
|
|
||||||
//{
|
|
||||||
// std::string dir = FileUtil::GetUserPath(D_THEMES_IDX) + theme_name + "/";
|
|
||||||
//
|
|
||||||
//#if !defined(_WIN32)
|
|
||||||
// // If theme does not exist in user's dir load from shared directory
|
|
||||||
// if (!FileUtil::Exists(dir))
|
|
||||||
// dir = SHARED_USER_DIR THEMES_DIR "/" + theme_name + "/";
|
|
||||||
//#endif
|
|
||||||
//
|
|
||||||
// return dir;
|
|
||||||
//}
|
|
||||||
|
|
||||||
size_t WriteStringToFile(bool text_file, const std::string &str, const char *filename)
|
size_t WriteStringToFile(bool text_file, const std::string &str, const char *filename)
|
||||||
{
|
{
|
||||||
return FileUtil::IOFile(filename, text_file ? "w" : "wb").WriteBytes(str.data(), str.size());
|
return FileUtil::IOFile(filename, text_file ? "w" : "wb").WriteBytes(str.data(), str.size());
|
||||||
|
@ -27,6 +27,7 @@ enum {
|
|||||||
D_STATESAVES_IDX,
|
D_STATESAVES_IDX,
|
||||||
D_SCREENSHOTS_IDX,
|
D_SCREENSHOTS_IDX,
|
||||||
D_SDMC_IDX,
|
D_SDMC_IDX,
|
||||||
|
D_SYSDATA_IDX,
|
||||||
D_HIRESTEXTURES_IDX,
|
D_HIRESTEXTURES_IDX,
|
||||||
D_DUMP_IDX,
|
D_DUMP_IDX,
|
||||||
D_DUMPFRAMES_IDX,
|
D_DUMPFRAMES_IDX,
|
||||||
|
Loading…
Reference in New Issue
Block a user