FEX/Config: Allow override of cache location

This will be used.
This commit is contained in:
Ryan Houdek authored and Tony Wasserka committed 2025-11-20 18:56:22 +01:00
1 parent e075916154
commit 709d767d61
1 file changed
+5
+5
View File
@@ -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/";