From 4d4acd55cc50ad975e3e1e7cdcf6eb3a5e2e709d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Tue, 21 Jan 2025 13:47:13 +0100 Subject: [PATCH] vrclient: Exclude some unused structs. --- vrclient_x64/gen_wrapper.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vrclient_x64/gen_wrapper.py b/vrclient_x64/gen_wrapper.py index 5095600c..b81baafe 100755 --- a/vrclient_x64/gen_wrapper.py +++ b/vrclient_x64/gen_wrapper.py @@ -219,6 +219,9 @@ all_sources = {} all_versions = {} unique_structs = [] +MANUAL_STRUCTS = [ + "COpenVRContext", # not actually used +] UNIX_FUNCS = [ 'vrclient_init', @@ -1060,6 +1063,12 @@ def find_struct_abis(name): def struct_needs_conversion(struct): name = canonical_typename(struct) + if name in EXEMPT_STRUCTS: + return False + if name in unique_structs: + return False + if name in MANUAL_STRUCTS: + return True abis = find_struct_abis(name) if abis is None: @@ -1698,6 +1707,8 @@ with open('unixlib_generated.cpp', 'w') as file: abis['w32'].write_checks(out, "w32_") abis['u32'].write_checks(out, "u32_") + if name in MANUAL_STRUCTS: continue + for sdkver, abis in structs.items(): if name not in all_versions[sdkver]: continue