diff --git a/libs/video/renderer/vulkan/vkgen/vkfieldauto.r b/libs/video/renderer/vulkan/vkgen/vkfieldauto.r index ee3d79535..de4a347c9 100644 --- a/libs/video/renderer/vulkan/vkgen/vkfieldauto.r +++ b/libs/video/renderer/vulkan/vkgen/vkfieldauto.r @@ -1,3 +1,5 @@ +#include + #include "vkfieldauto.h" #include "vkgen.h" #include "vkstruct.h" @@ -10,7 +12,8 @@ if (!self) { return self; } - field = [strct findField:field_name]; + string real_name = [[item getObjectForKey:"field"] string]; + field = [strct findField:real_name ? real_name : field_name]; return self; } @@ -25,7 +28,7 @@ { Type *field_type = [Type findType: field.type]; fprintf (output_file, "\t{\"%s\", field_offset (%s, %s), %s, %s, %s},\n", - field_name, struct_name, field_name, + field_name, struct_name, field.name, [field_type parseType], [field_type parseFunc], [field_type parseData]); return self; @@ -36,7 +39,7 @@ Type *field_type = [Type findType: field.type]; fprintf (output_file, "\t{\"%s\", &%s, (void *) field_offset (%s, %s)},\n", - field_name, [field_type cexprType], struct_name, field_name); + field_name, [field_type cexprType], struct_name, field.name); return self; }