To fix the problem of material files using a qualified path, change this into Tools.h
//char* Path_CombineA(OUT char* zResource, IN char* path, IN char* combine) {
// long offset = lstrlenA(path);
// ClearMemory(zResource, MAX_PATH);
// MoveMemory(zResource, path, offset);
// MoveMemory(&zResource[offset], &combine[0], strlen(combine));
// return zResource;
//}
char* Path_CombineA(OUT char* zResource, IN char* path, IN char* combine) {
long offset = lstrlenA(path);
ClearMemory(zResource, MAX_PATH);
if (strstr(combine, "\\")) {
strcpy(zResource, combine);
} else {
MoveMemory(zResource, path, offset);
MoveMemory(&zResource[offset], &combine[0], strlen(combine));
}
return zResource;
}
Note: To detect the use of Ctrl key, you can use the built-in ZI_IsCtrlKeyPressed() API.