mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 17:00:19 +02:00
FEX/Config: Allow override of cache location
This will be used.
This commit is contained in:
1 parent
e075916154
commit
709d767d61
1 file changed
+5
@@ -603,6 +603,11 @@ fextl::string GetConfigDirectory(bool Global, const PortableInformation& Portabl
|
||||
}
|
||||
|
||||
fextl::string GetCacheDirectory() {
|
||||
const char* CacheOverride = getenv("FEX_APP_CACHE_LOCATION");
|
||||
if (CacheOverride) {
|
||||
return CacheOverride;
|
||||
}
|
||||
|
||||
const char* HomeDir = GetHomeDirectory();
|
||||
const char* CacheXDG = getenv("XDG_CACHE_HOME");
|
||||
return (CacheXDG ? fextl::string {CacheXDG} : (fextl::string {HomeDir} + "/.cache")) + "/fex-emu/";
|
||||
|
||||
Reference in new issue
Block a user