vulkan json on windows is located adjacent to renderdoc.dll, not exe

* This means the json is still located if we're not running this code from
  qrenderdoc.exe or renderdoccmd.exe
This commit is contained in:
baldurk
2018-11-26 14:06:30 +00:00
parent 26511c546c
commit 8209b2be46
+7 -9
View File
@@ -22,6 +22,7 @@
* THE SOFTWARE.
******************************************************************************/
#include "strings/string_utils.h"
#include "vk_core.h"
#include "vk_replay.h"
@@ -163,19 +164,16 @@ void *LoadVulkanLibrary()
std::wstring GetJSONPath(bool wow6432)
{
wchar_t curFile[1024];
GetModuleFileNameW(NULL, curFile, 1024);
wchar_t *lastSlash = wcsrchr(curFile, '\\');
if(lastSlash)
*(lastSlash + 1) = 0;
std::string libPath;
FileIO::GetLibraryFilename(libPath);
std::string jsonPath = dirname(FileIO::GetFullPathname(libPath));
if(wow6432)
wcscat_s(curFile, L"x86\\");
jsonPath += "\\x86";
wcscat_s(curFile, L"renderdoc.json");
jsonPath += "\\renderdoc.json";
return curFile;
return StringFormat::UTF82Wide(jsonPath);
}
static HKEY GetImplicitLayersKey(bool writeable, bool wow6432)