mirror of
https://git.suyu.dev/suyu/Yucom.git
synced 2025-12-22 05:36:09 +01:00
lsteamclient: Use manual method wrapper instead of post-exec.
CW-Bug-Id: #22729
This commit is contained in:
parent
4092684400
commit
fce62d2dfd
22 changed files with 438 additions and 501 deletions
|
|
@ -228,13 +228,11 @@ MANUAL_METHODS = {
|
|||
"ISteamNetworkingFakeUDPPort_DestroyFakeUDPPort": lambda ver, abi: abi == 'u',
|
||||
"ISteamNetworkingFakeUDPPort_ReceiveMessages": lambda ver, abi: abi == 'u',
|
||||
|
||||
"ISteamClient_BShutdownIfAllPipesClosed": lambda ver, abi: abi == 'w',
|
||||
"ISteamClient_CreateSteamPipe": lambda ver, abi: abi == 'w',
|
||||
"ISteamClient_Set_SteamAPI_CCheckCallbackRegisteredInProcess": lambda ver, abi: abi == 'u' and ver >= 20,
|
||||
}
|
||||
|
||||
POST_EXEC_FUNCS = {
|
||||
"ISteamClient_BShutdownIfAllPipesClosed" : "after_shutdown",
|
||||
"ISteamClient_CreateSteamPipe" : "after_steam_pipe_create",
|
||||
}
|
||||
|
||||
DEFINE_INTERFACE_VERSION = re.compile(r'^#define\s*(?P<name>STEAM(?:\w*)_VERSION(?:\w*))\s*"(?P<version>.*)"')
|
||||
|
||||
|
|
@ -250,9 +248,6 @@ def is_manual_method(klass, method, abi):
|
|||
return needs_manual
|
||||
|
||||
|
||||
def post_execution_function(classname, method_name):
|
||||
return POST_EXEC_FUNCS.get(classname + "_" + method_name, None)
|
||||
|
||||
# manual converters for simple types (function pointers)
|
||||
MANUAL_TYPES = [
|
||||
"FSteamNetworkingSocketsDebugOutput",
|
||||
|
|
@ -956,9 +951,6 @@ def handle_method_cpp(method, classname, cppname, out):
|
|||
for name, param in sorted(need_output.items()):
|
||||
out(f' *params->{name} = u_{name};\n')
|
||||
|
||||
if method.result_type.kind != TypeKind.VOID:
|
||||
post_exec = post_execution_function(classname, method.spelling)
|
||||
if post_exec: out(f' params->_ret = {post_exec}( params->_ret );\n')
|
||||
out(u'}\n\n')
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue