mirror of
https://github.com/ValveSoftware/Proton.git
synced 2025-05-29 04:50:17 +02:00
lsteamclient: Manually wrap some unix side ISteamMatchmakingServers methods.
This avoids returning unix-side server info structures from the PE-side. For the v2 API requests are wrapped entirely and for v1 API as there is no explicit release function, results are cached forvever using the buffer cache.
This commit is contained in:
parent
375815c5ba
commit
3a20f26df9
@ -5,54 +5,6 @@
|
||||
#pragma makedep unix
|
||||
#endif
|
||||
|
||||
NTSTATUS ISteamMatchmakingServers_SteamMatchMakingServers002_GetServerDetails( void *args )
|
||||
{
|
||||
struct ISteamMatchmakingServers_SteamMatchMakingServers002_GetServerDetails_params *params = (struct ISteamMatchmakingServers_SteamMatchMakingServers002_GetServerDetails_params *)args;
|
||||
struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *iface = (struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *)params->u_iface;
|
||||
params->_ret = iface->GetServerDetails( params->hRequest, params->iServer );
|
||||
return 0;
|
||||
}
|
||||
|
||||
NTSTATUS ISteamMatchmakingServers_SteamMatchMakingServers002_CancelQuery( void *args )
|
||||
{
|
||||
struct ISteamMatchmakingServers_SteamMatchMakingServers002_CancelQuery_params *params = (struct ISteamMatchmakingServers_SteamMatchMakingServers002_CancelQuery_params *)args;
|
||||
struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *iface = (struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *)params->u_iface;
|
||||
iface->CancelQuery( params->hRequest );
|
||||
return 0;
|
||||
}
|
||||
|
||||
NTSTATUS ISteamMatchmakingServers_SteamMatchMakingServers002_RefreshQuery( void *args )
|
||||
{
|
||||
struct ISteamMatchmakingServers_SteamMatchMakingServers002_RefreshQuery_params *params = (struct ISteamMatchmakingServers_SteamMatchMakingServers002_RefreshQuery_params *)args;
|
||||
struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *iface = (struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *)params->u_iface;
|
||||
iface->RefreshQuery( params->hRequest );
|
||||
return 0;
|
||||
}
|
||||
|
||||
NTSTATUS ISteamMatchmakingServers_SteamMatchMakingServers002_IsRefreshing( void *args )
|
||||
{
|
||||
struct ISteamMatchmakingServers_SteamMatchMakingServers002_IsRefreshing_params *params = (struct ISteamMatchmakingServers_SteamMatchMakingServers002_IsRefreshing_params *)args;
|
||||
struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *iface = (struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *)params->u_iface;
|
||||
params->_ret = iface->IsRefreshing( params->hRequest );
|
||||
return 0;
|
||||
}
|
||||
|
||||
NTSTATUS ISteamMatchmakingServers_SteamMatchMakingServers002_GetServerCount( void *args )
|
||||
{
|
||||
struct ISteamMatchmakingServers_SteamMatchMakingServers002_GetServerCount_params *params = (struct ISteamMatchmakingServers_SteamMatchMakingServers002_GetServerCount_params *)args;
|
||||
struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *iface = (struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *)params->u_iface;
|
||||
params->_ret = iface->GetServerCount( params->hRequest );
|
||||
return 0;
|
||||
}
|
||||
|
||||
NTSTATUS ISteamMatchmakingServers_SteamMatchMakingServers002_RefreshServer( void *args )
|
||||
{
|
||||
struct ISteamMatchmakingServers_SteamMatchMakingServers002_RefreshServer_params *params = (struct ISteamMatchmakingServers_SteamMatchMakingServers002_RefreshServer_params *)args;
|
||||
struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *iface = (struct u_ISteamMatchmakingServers_SteamMatchMakingServers002 *)params->u_iface;
|
||||
iface->RefreshServer( params->hRequest, params->iServer );
|
||||
return 0;
|
||||
}
|
||||
|
||||
NTSTATUS ISteamMatchmakingServers_SteamMatchMakingServers002_CancelServerQuery( void *args )
|
||||
{
|
||||
struct ISteamMatchmakingServers_SteamMatchMakingServers002_CancelServerQuery_params *params = (struct ISteamMatchmakingServers_SteamMatchMakingServers002_CancelServerQuery_params *)args;
|
||||
|
@ -237,8 +237,14 @@ MANUAL_METHODS = {
|
||||
"ISteamNetworkingSockets_ConnectP2PCustomSignaling": lambda ver, abi: abi == 'u' and ver <= 8,
|
||||
"ISteamNetworkingSockets_ReceivedP2PCustomSignal": lambda ver, abi: abi == 'u' and ver <= 8,
|
||||
|
||||
"ISteamMatchmakingServers_CancelQuery": lambda ver, abi: abi == 'u' and ver >= 2,
|
||||
"ISteamMatchmakingServers_GetServerCount": lambda ver, abi: abi == 'u' and ver >= 2,
|
||||
"ISteamMatchmakingServers_GetServerDetails": lambda ver, abi: abi == 'u' and ver >= 2,
|
||||
"ISteamMatchmakingServers_IsRefreshing": lambda ver, abi: abi == 'u' and ver >= 2,
|
||||
"ISteamMatchmakingServers_PingServer": lambda ver, abi: abi == 'u',
|
||||
"ISteamMatchmakingServers_PlayerDetails": lambda ver, abi: abi == 'u',
|
||||
"ISteamMatchmakingServers_RefreshQuery": lambda ver, abi: abi == 'u' and ver >= 2,
|
||||
"ISteamMatchmakingServers_RefreshServer": lambda ver, abi: abi == 'u' and ver >= 2,
|
||||
"ISteamMatchmakingServers_ReleaseRequest": lambda ver, abi: abi == 'w' or abi == 'u',
|
||||
"ISteamMatchmakingServers_RequestFavoritesServerList": lambda ver, abi: abi == 'u',
|
||||
"ISteamMatchmakingServers_RequestFriendsServerList": lambda ver, abi: abi == 'u',
|
||||
|
@ -390,6 +390,48 @@ static NTSTATUS ISteamMatchmakingServers_ReleaseRequest( Iface *iface, Params *p
|
||||
return 0;
|
||||
}
|
||||
|
||||
template< typename Iface, typename Params >
|
||||
static NTSTATUS ISteamMatchmakingServers_GetServerDetails( Iface *iface, Params *params )
|
||||
{
|
||||
params->_ret = iface->GetServerDetails( params->hRequest, params->iServer );
|
||||
return 0;
|
||||
}
|
||||
|
||||
template< typename Iface, typename Params >
|
||||
static NTSTATUS ISteamMatchmakingServers_CancelQuery( Iface *iface, Params *params )
|
||||
{
|
||||
iface->CancelQuery( params->hRequest );
|
||||
return 0;
|
||||
}
|
||||
|
||||
template< typename Iface, typename Params >
|
||||
static NTSTATUS ISteamMatchmakingServers_RefreshQuery( Iface *iface, Params *params )
|
||||
{
|
||||
iface->RefreshQuery( params->hRequest );
|
||||
return 0;
|
||||
}
|
||||
|
||||
template< typename Iface, typename Params >
|
||||
static NTSTATUS ISteamMatchmakingServers_IsRefreshing( Iface *iface, Params *params )
|
||||
{
|
||||
params->_ret = iface->IsRefreshing( params->hRequest );
|
||||
return 0;
|
||||
}
|
||||
|
||||
template< typename Iface, typename Params >
|
||||
static NTSTATUS ISteamMatchmakingServers_GetServerCount( Iface *iface, Params *params )
|
||||
{
|
||||
params->_ret = iface->GetServerCount( params->hRequest );
|
||||
return 0;
|
||||
}
|
||||
|
||||
template< typename Iface, typename Params >
|
||||
static NTSTATUS ISteamMatchmakingServers_RefreshServer( Iface *iface, Params *params )
|
||||
{
|
||||
iface->RefreshServer( params->hRequest, params->iServer );
|
||||
return 0;
|
||||
}
|
||||
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers001, RequestInternetServerList );
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers001, RequestLANServerList );
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers001, RequestFriendsServerList );
|
||||
@ -410,3 +452,9 @@ LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers002, Pi
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers002, PlayerDetails );
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers002, ServerRules );
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers002, ReleaseRequest );
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers002, GetServerDetails );
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers002, CancelQuery );
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers002, RefreshQuery );
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers002, IsRefreshing );
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers002, GetServerCount );
|
||||
LSTEAMCLIENT_UNIX_IMPL( ISteamMatchmakingServers, SteamMatchMakingServers002, RefreshServer );
|
||||
|
Loading…
x
Reference in New Issue
Block a user