mirror of
https://github.com/coah80/LegacyVulkEdition.git
synced 2026-06-24 10:05:35 +00:00
game runs, vulkan window stays open, world generates
This commit is contained in:
@@ -1438,7 +1438,13 @@ HRESULT C4JRender::LoadTextureData(const char *szFilename, D3DXIMAGE_INFO *pSrcI
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
FILE *file = std::fopen(szFilename, "rb");
|
||||
char fixedPath[1024];
|
||||
std::strncpy(fixedPath, szFilename, sizeof(fixedPath) - 1);
|
||||
fixedPath[sizeof(fixedPath) - 1] = '\0';
|
||||
for (char *p = fixedPath; *p; ++p)
|
||||
if (*p == '\\') *p = '/';
|
||||
|
||||
FILE *file = std::fopen(fixedPath, "rb");
|
||||
if (file == nullptr)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
|
||||
Reference in New Issue
Block a user