Fixed build.

This commit is contained in:
Branimir Karadžić 2019-02-16 21:25:13 -08:00
parent 26b5fc3b34
commit 5495b432f3
2 changed files with 8 additions and 3 deletions

View File

@ -107,7 +107,7 @@ namespace bgfx { namespace hlsl
if (g_verbose)
{
char filePath[MAX_PATH];
char filePath[bx::kMaxFilePath];
GetModuleFileNameA( (HMODULE)s_d3dcompilerdll, filePath, sizeof(filePath) );
BX_TRACE("Loaded %s compiler (%s).", compiler->fileName, filePath);
}

View File

@ -1091,13 +1091,18 @@ void keyBindingHelp(const char* _bindings, const char* _description)
ImGui::Text(_description);
}
#if BX_PLATFORM_WINDOWS
extern "C" void* GetModuleHandleA(const char* _moduleName);
extern "C" uint32_t GetModuleFileNameA(void* _module, char* _outFilePath, uint32_t _size);
#endif // BX_PLATFORM_WINDOWS
void associate()
{
#if BX_PLATFORM_WINDOWS
std::string str;
char exec[MAX_PATH];
GetModuleFileNameA(GetModuleHandleA(NULL), exec, MAX_PATH);
char exec[bx::kMaxFilePath];
GetModuleFileNameA(GetModuleHandleA(NULL), exec, sizeof(exec) );
std::string strExec = bx::replaceAll<std::string>(exec, "\\", "\\\\");