2
0
mirror of https://github.com/ValveSoftware/Proton synced 2025-08-31 06:35:23 +00:00

lsteamclient: Also convert callbacks during GetAPICallResult

This commit is contained in:
Andrew Eikum
2018-10-30 11:30:28 -05:00
parent 0466c19484
commit d4307363c9
4 changed files with 39 additions and 20 deletions

View File

@@ -305,12 +305,16 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e
else:
cpp.write(" return ")
should_do_cb_wrap = "GetAPICallResult" in used_name
should_gen_wrapper = method.result_type.spelling.startswith("ISteam") or \
used_name.startswith("GetISteamGenericInterface")
if should_gen_wrapper:
cfile.write("create_win_interface(pchVersion,\n ")
cfile.write("%s_%s(_this->linux_side" % (cppname, used_name))
if should_do_cb_wrap:
cfile.write("do_cb_wrap(0, _this->linux_side, &%s_%s" % (cppname, used_name))
else:
if should_gen_wrapper:
cfile.write("create_win_interface(pchVersion,\n ")
cfile.write("%s_%s(_this->linux_side" % (cppname, used_name))
cpp.write("((%s*)linux_side)->%s(" % (classname, method.spelling))
unnamed = 'a'
first = True