Kill off replaceable usages of s[n]printf.

This commit is contained in:
Lioncash
2014-06-03 01:08:54 -04:00
parent dccd9ead7d
commit ce54c1e571
29 changed files with 216 additions and 243 deletions

View File

@ -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);