lsteamclient: Execute any pending callback before ReleaseRequest.

CW-Bug-Id: #22729
This commit is contained in:
Rémi Bernon 2024-01-09 18:33:53 +01:00 committed by Arkadiusz Hiler
parent 22672c5b0a
commit faf681cd9c
5 changed files with 19 additions and 12 deletions

View file

@ -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',

View file

@ -674,3 +674,18 @@ w_SteamNetworkingMessage_t_153a *__thiscall winISteamNetworkingUtils_SteamNetwor
STEAMCLIENT_CALL( ISteamNetworkingUtils_SteamNetworkingUtils004_AllocateMessage, &params );
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, &params );
}

View file

@ -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};

View file

@ -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);

View file

@ -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, &params );
}
gameserveritem_t_105 * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_GetServerDetails(struct w_steam_iface *_this, void *hRequest, int32_t iServer)
{
struct ISteamMatchmakingServers_SteamMatchMakingServers002_GetServerDetails_params params =