From f6f602da32e1eda477fefbaa136c9eaf4efcf229 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 28 May 2025 23:45:27 +0200 Subject: [PATCH] Add cache dir support. --- profiler/src/profiler/TracyStorage.cpp | 61 ++++++++++++++++++++++++++ profiler/src/profiler/TracyStorage.hpp | 2 + 2 files changed, 63 insertions(+) diff --git a/profiler/src/profiler/TracyStorage.cpp b/profiler/src/profiler/TracyStorage.cpp index 66e4f19c..3f85326d 100644 --- a/profiler/src/profiler/TracyStorage.cpp +++ b/profiler/src/profiler/TracyStorage.cpp @@ -88,6 +88,40 @@ static void GetConfigDirectory( char* buf, size_t& sz ) #endif } +static void GetCacheDirectory( char* buf, size_t& sz ) +{ +#ifdef _WIN32 + auto path = getenv( "LOCALAPPDATA" ); + sz = strlen( path ); + memcpy( buf, path, sz ); + + for( size_t i=0; i