Browse Source

Fixed build.

Branimir Karadžić 6 years ago
parent
commit
5495b432f3
2 changed files with 8 additions and 3 deletions
  1. 1 1
      tools/shaderc/shaderc_hlsl.cpp
  2. 7 2
      tools/texturev/texturev.cpp

+ 1 - 1
tools/shaderc/shaderc_hlsl.cpp

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

+ 7 - 2
tools/texturev/texturev.cpp

@@ -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, "\\", "\\\\");