mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-04 13:33:34 +00:00
Fix loading referenced textures for models at project root;
This commit is contained in:
parent
7a309c88ca
commit
c59c545198
|
@ -135,6 +135,7 @@ static int readMaterialTexture(struct aiMaterial* assimpMaterial, enum aiTexture
|
||||||
strncpy(fullPath, dirname, LOVR_PATH_MAX);
|
strncpy(fullPath, dirname, LOVR_PATH_MAX);
|
||||||
char* lastSlash = strrchr(fullPath, '/');
|
char* lastSlash = strrchr(fullPath, '/');
|
||||||
if (lastSlash) lastSlash[1] = '\0';
|
if (lastSlash) lastSlash[1] = '\0';
|
||||||
|
else fullPath[0] = '\0';
|
||||||
strncat(fullPath, path, LOVR_PATH_MAX);
|
strncat(fullPath, path, LOVR_PATH_MAX);
|
||||||
normalizePath(fullPath, normalizedPath, LOVR_PATH_MAX);
|
normalizePath(fullPath, normalizedPath, LOVR_PATH_MAX);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue