Hopefully this fixes the SteamAPI_ISteamGameServer_GetPublicIP function

This commit is contained in:
Mr_Goldberg 2021-04-09 14:53:20 -04:00
parent c48526d49a
commit 19015c097c
No known key found for this signature in database
GPG key ID: 8597D87419DEF278
6 changed files with 19 additions and 5 deletions

View file

@ -5843,13 +5843,14 @@ STEAMAPI_API SteamAPICall_t SteamAPI_ISteamGameServer_GetServerReputation( IStea
return self->GetServerReputation();
}
STEAMAPI_API uint32 SteamAPI_ISteamGameServer_GetPublicIP( intptr_t instancePtr, void *instancePtr_possible )
STEAMAPI_API void *SteamAPI_ISteamGameServer_GetPublicIP( intptr_t instancePtr, void *instancePtr_possible )
{
//TODO: check if this actually works (ret value changed from uint32 to struct)
//abuse call convention rules to get this working.
if (steamclient_has_ipv6_functions()) {
return ((ISteamGameServer012 *)instancePtr_possible)->GetPublicIP_old();
get_steam_client()->steam_gameserver->GetPublicIP_fix((SteamIPAddress_t *)instancePtr);
return (void *)instancePtr;
} else {
return ((ISteamGameServer012 *)instancePtr)->GetPublicIP_old();
return (void *)((ISteamGameServer012 *)instancePtr)->GetPublicIP_old();
}
}