Common/Config: Fixes Cache directory when STEAM_COMPAT_SHADER_PATH on Win32

Moves cache data from %APPDATA% to wherever `STEAM_COMPAT_SHADER_PATH`
points. Turns out this was easier than expected.

Basically moving disk cache from:
- compatdata/<AppID>/pfx/drive_c/users/steamuser/AppData/Local/fex-emu/DiskCache
to:
- shadercache/<AppID>/fex-emu/DiskCache/

Fixes #5913
This commit is contained in:
Ryan Houdek committed 2026-09-04 14:20:57 -07:00
1 parent 7187bc0e59
commit 37675e0351
1 file changed
+1 -1
+1 -1
View File
@@ -714,7 +714,6 @@ fextl::string GetCacheDirectory() {
return CacheOverride;
}
#ifndef _WIN32
#ifdef FEX_STEAM_SUPPORT
const char* SteamDataPath = getenv("STEAM_COMPAT_SHADER_PATH");
if (SteamDataPath) {
@@ -722,6 +721,7 @@ fextl::string GetCacheDirectory() {
}
#endif
#ifndef _WIN32
auto HomeDir = GetHomeDirectory();
const char* CacheXDG = getenv("XDG_CACHE_HOME");
return (CacheXDG ? fextl::string {CacheXDG} : (fextl::string {HomeDir} + "/.cache")) + "/fex-emu/";