mirror of
https://git.suyu.dev/suyu/Yucom.git
synced 2025-12-24 00:04:34 +01:00
lsteamclient: Convert windows VK to xkeysym
This commit is contained in:
parent
1a2fd5fdbc
commit
5b674f087a
8 changed files with 165 additions and 1 deletions
|
|
@ -181,6 +181,11 @@ manual_type_converters = [
|
|||
"FSteamNetworkingSocketsDebugOutput"
|
||||
]
|
||||
|
||||
# manual converters for specific parameters
|
||||
manual_param_converters = [
|
||||
"nNativeKeyCode"
|
||||
]
|
||||
|
||||
#struct_conversion_cache = {
|
||||
# '142': {
|
||||
# 'SteamUGCDetails_t': True,
|
||||
|
|
@ -540,6 +545,8 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e
|
|||
win_name = typename.replace(real_type.spelling, "win%s_%s" % (real_type.spelling, sdkver))
|
||||
elif real_type.spelling in manual_type_converters:
|
||||
manual_convert.append(param)
|
||||
elif param.spelling in manual_param_converters:
|
||||
manual_convert.append(param)
|
||||
|
||||
if param.spelling == "":
|
||||
cfile.write(", %s _%s" % (win_name, unnamed))
|
||||
|
|
@ -587,7 +594,10 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e
|
|||
cpp.write(" %s lin_%s;\n" % (param.type.spelling, param.spelling))
|
||||
cpp.write(" win_to_lin_struct_%s_%s(&%s, &lin_%s);\n" % (param.type.spelling, sdkver, param.spelling, param.spelling))
|
||||
for param in manual_convert:
|
||||
cpp.write(" %s = (%s)manual_convert_%s((void*)%s);\n" % (param.spelling, param.type.spelling, param.type.spelling, param.spelling))
|
||||
if param.spelling in manual_param_converters:
|
||||
cpp.write(" %s = manual_convert_%s(%s);\n" % (param.spelling, param.spelling, param.spelling))
|
||||
else:
|
||||
cpp.write(" %s = (%s)manual_convert_%s((void*)%s);\n" % (param.spelling, param.type.spelling, param.type.spelling, param.spelling))
|
||||
|
||||
cfile.write(" TRACE(\"%p\\n\", _this);\n")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue