summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/D3D/PixelShaderCache.cpp')
-rw-r--r--Source/Core/VideoBackends/D3D/PixelShaderCache.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp b/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp
index d4d3e392b4..3531ec1389 100644
--- a/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp
+++ b/Source/Core/VideoBackends/D3D/PixelShaderCache.cpp
@@ -2,8 +2,11 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
+#include <string>
+
#include "Common/FileUtil.h"
#include "Common/LinearDiskCache.h"
+#include "Common/StringUtil.h"
#include "Core/ConfigManager.h"
@@ -396,8 +399,7 @@ void PixelShaderCache::Init()
SETSTAT(stats.numPixelShadersCreated, 0);
SETSTAT(stats.numPixelShadersAlive, 0);
- char cache_filename[MAX_PATH];
- sprintf(cache_filename, "%sdx11-%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(),
+ std::string cache_filename = StringFromFormat("%sdx11-%s-ps.cache", File::GetUserPath(D_SHADERCACHE_IDX).c_str(),
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID.c_str());
PixelShaderCacheInserter inserter;
g_ps_disk_cache.OpenAndRead(cache_filename, inserter);