From 727441cc24d54d9a6623d523788d4011c526ba94 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 4 May 2020 20:29:58 +0200 Subject: [PATCH] winevulkan: Support struct forward-declarations as base types. Some types are basically forward-declared structs now, such as ANativeWindow. Signed-off-by: Philip Rebohle Signed-off-by: Liam Middlebrook Signed-off-by: Alexandre Julliard --- dlls/winevulkan/make_vulkan | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 5d9889620ed..e24dac99011 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -253,7 +253,10 @@ class VkBaseType(object): def definition(self): # Definition is similar for alias or non-alias as type # is already set to alias. - return "typedef {0} {1};\n".format(self.type, self.name) + if not self.type is None: + return "typedef {0} {1};\n".format(self.type, self.name) + else: + return "struct {0};\n".format(self.name) def is_alias(self): return bool(self.alias) @@ -2953,7 +2956,9 @@ class VkRegistry(object): if type_info["category"] == "basetype": name = t.find("name").text - _type = t.find("type").text + _type = None + if not t.find("type") is None: + _type = t.find("type").text basetype = VkBaseType(name, _type) base_types.append(basetype) type_info["data"] = basetype