diff --git a/lsteamclient/gen_wrapper.py b/lsteamclient/gen_wrapper.py index 4c73c173..d4a465e6 100755 --- a/lsteamclient/gen_wrapper.py +++ b/lsteamclient/gen_wrapper.py @@ -230,6 +230,7 @@ MANUAL_METHODS = { "ISteamMatchmakingServers_PingServer": lambda ver, abi: abi == 'u', "ISteamMatchmakingServers_PlayerDetails": lambda ver, abi: abi == 'u', + "ISteamMatchmakingServers_ReleaseRequest": lambda ver, abi: abi == 'w', "ISteamMatchmakingServers_RequestFavoritesServerList": lambda ver, abi: abi == 'u', "ISteamMatchmakingServers_RequestFriendsServerList": lambda ver, abi: abi == 'u', "ISteamMatchmakingServers_RequestHistoryServerList": lambda ver, abi: abi == 'u', diff --git a/lsteamclient/steam_networking_manual.c b/lsteamclient/steam_networking_manual.c index 857d545d..e2f95978 100644 --- a/lsteamclient/steam_networking_manual.c +++ b/lsteamclient/steam_networking_manual.c @@ -674,3 +674,18 @@ w_SteamNetworkingMessage_t_153a *__thiscall winISteamNetworkingUtils_SteamNetwor STEAMCLIENT_CALL( ISteamNetworkingUtils_SteamNetworkingUtils004_AllocateMessage, ¶ms ); return params._ret; } + +void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_ReleaseRequest( struct w_steam_iface *_this, void *hServerListRequest ) +{ + struct ISteamMatchmakingServers_SteamMatchMakingServers002_ReleaseRequest_params params = + { + .linux_side = _this->u_iface, + .hServerListRequest = hServerListRequest, + }; + + TRACE("%p\n", _this); + + execute_pending_callbacks(); /* execute any pending callbacks that might still need to use the request */ + + STEAMCLIENT_CALL( ISteamMatchmakingServers_SteamMatchMakingServers002_ReleaseRequest, ¶ms ); +} diff --git a/lsteamclient/steamclient_main.c b/lsteamclient/steamclient_main.c index 82e987c6..dba7e55f 100644 --- a/lsteamclient/steamclient_main.c +++ b/lsteamclient/steamclient_main.c @@ -347,7 +347,7 @@ void *CDECL CreateInterface(const char *name, int *return_code) return create_win_interface( name, params._ret ); } -static void execute_pending_callbacks(void) +void execute_pending_callbacks(void) { struct steamclient_next_callback_params params = {0}; diff --git a/lsteamclient/steamclient_private.h b/lsteamclient/steamclient_private.h index 2d8ddc9e..dc754c70 100644 --- a/lsteamclient/steamclient_private.h +++ b/lsteamclient/steamclient_private.h @@ -40,6 +40,8 @@ typedef struct w_steam_iface *(*iface_constructor)( void * ); extern iface_constructor find_iface_constructor( const char *iface_version ); extern struct w_steam_iface *create_winISteamNetworkingFakeUDPPort_SteamNetworkingFakeUDPPort001( void * ); +extern void execute_pending_callbacks(void); + struct w_steam_iface *create_win_interface(const char *name, void *linux_side); void *alloc_mem_for_iface(size_t size, const char *iface_version); void *alloc_vtable(void *vtable, unsigned int method_count, const char *iface_version); diff --git a/lsteamclient/winISteamMatchmakingServers.c b/lsteamclient/winISteamMatchmakingServers.c index 46882a94..641c65b0 100644 --- a/lsteamclient/winISteamMatchmakingServers.c +++ b/lsteamclient/winISteamMatchmakingServers.c @@ -366,17 +366,6 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_Request return params._ret; } -void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_ReleaseRequest(struct w_steam_iface *_this, void *hServerListRequest) -{ - struct ISteamMatchmakingServers_SteamMatchMakingServers002_ReleaseRequest_params params = - { - .linux_side = _this->u_iface, - .hServerListRequest = hServerListRequest, - }; - TRACE("%p\n", _this); - STEAMCLIENT_CALL( ISteamMatchmakingServers_SteamMatchMakingServers002_ReleaseRequest, ¶ms ); -} - gameserveritem_t_105 * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_GetServerDetails(struct w_steam_iface *_this, void *hRequest, int32_t iServer) { struct ISteamMatchmakingServers_SteamMatchMakingServers002_GetServerDetails_params params =