From 37675e035199f857eea1c9f72f37f6e937624abf Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 4 Sep 2026 14:20:57 -0700 Subject: [PATCH] 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//pfx/drive_c/users/steamuser/AppData/Local/fex-emu/DiskCache to: - shadercache//fex-emu/DiskCache/ Fixes #5913 --- Source/Common/Config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Common/Config.cpp b/Source/Common/Config.cpp index 7bea30c5f..676b2f52a 100644 --- a/Source/Common/Config.cpp +++ b/Source/Common/Config.cpp @@ -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/";