mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-23 12:28:07 +01:00
Implement SteamNetworkingIdentity_ToString for volcanoids
This commit is contained in:
parent
31c1453d2b
commit
d86721afcb
1 changed files with 17 additions and 0 deletions
|
@ -349,6 +349,23 @@ bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char
|
|||
void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity &identity, char *buf, size_t cbBuf )
|
||||
{
|
||||
PRINT_DEBUG("Steam_Networking_Utils::SteamNetworkingIdentity_ToString\n");
|
||||
if (identity.m_eType == k_ESteamNetworkingIdentityType_SteamID)
|
||||
{
|
||||
if (buf != nullptr)
|
||||
{
|
||||
std::string str("steamid:");
|
||||
str += std::move(std::to_string(identity.GetSteamID64()));
|
||||
strncpy(buf, str.c_str(), cbBuf);
|
||||
buf[cbBuf - 1] = '\0';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cbBuf != 0 && buf != nullptr)
|
||||
{
|
||||
*buf = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, const char *pszStr )
|
||||
|
|
Loading…
Reference in a new issue