lsteamclient: Use the buffer cache for ISteamMatchmakingServers_GetServerDetails.

This commit is contained in:
Rémi Bernon 2025-01-16 10:49:47 +01:00 committed by Arkadiusz Hiler
parent 8e9e7b97ab
commit 76b98269dd
4 changed files with 7 additions and 4 deletions

View File

@ -675,6 +675,8 @@ class Method:
return self.result_type.spelling.startswith("ISteam") or "GetISteam" in self.name
def returns_string(self):
if self._klass.name == 'ISteamMatchmakingServers' and self.name == 'GetServerDetails':
return True
return self.result_type.spelling == "const char *"
def write_params(self, out):

View File

@ -73,6 +73,7 @@ struct u_buffer
UINT64 len;
#ifdef __cplusplus
struct u_buffer &operator=(const char* value) { this->ptr = (UINT_PTR)value; this->len = value ? strlen( value ) + 1 : 0; return *this; }
template< typename T > struct u_buffer &operator=(const T* value) { this->ptr = (UINT_PTR)value; this->len = value ? sizeof( *value ) : 0; return *this; }
operator char*() const { return (char*)(UINT_PTR)this->ptr; }
#endif /* __cplusplus */
};

View File

@ -40135,7 +40135,7 @@ struct ISteamMatchmakingServers_SteamMatchMakingServers001_RequestSpectatorServe
struct ISteamMatchmakingServers_SteamMatchMakingServers001_GetServerDetails_params
{
struct u_iface u_iface;
gameserveritem_t_105 *_ret;
struct u_buffer _ret;
uint32_t eType;
int32_t iServer;
};
@ -40273,7 +40273,7 @@ struct ISteamMatchmakingServers_SteamMatchMakingServers002_ReleaseRequest_params
struct ISteamMatchmakingServers_SteamMatchMakingServers002_GetServerDetails_params
{
struct u_iface u_iface;
gameserveritem_t_105 *_ret;
struct u_buffer _ret;
void *hRequest;
int32_t iServer;
};

View File

@ -112,7 +112,7 @@ gameserveritem_t_105 * __thiscall winISteamMatchmakingServers_SteamMatchMakingSe
};
TRACE("%p\n", _this);
STEAMCLIENT_CALL( ISteamMatchmakingServers_SteamMatchMakingServers001_GetServerDetails, &params );
return params._ret;
return get_unix_buffer( params._ret );
}
void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers001_CancelQuery(struct w_iface *_this, uint32_t eType)
@ -288,7 +288,7 @@ gameserveritem_t_105 * __thiscall winISteamMatchmakingServers_SteamMatchMakingSe
};
TRACE("%p\n", _this);
STEAMCLIENT_CALL( ISteamMatchmakingServers_SteamMatchMakingServers002_GetServerDetails, &params );
return params._ret;
return get_unix_buffer( params._ret );
}
void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_CancelQuery(struct w_iface *_this, void *hRequest)