1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00

Fix loading referenced textures for models at project root;

This commit is contained in:
bjorn 2018-04-04 23:42:15 -07:00
parent 7a309c88ca
commit c59c545198

View file

@ -135,6 +135,7 @@ static int readMaterialTexture(struct aiMaterial* assimpMaterial, enum aiTexture
strncpy(fullPath, dirname, LOVR_PATH_MAX);
char* lastSlash = strrchr(fullPath, '/');
if (lastSlash) lastSlash[1] = '\0';
else fullPath[0] = '\0';
strncat(fullPath, path, LOVR_PATH_MAX);
normalizePath(fullPath, normalizedPath, LOVR_PATH_MAX);