more accurate implementation for Steam_Client::BReleaseSteamPipe(), return true if the pipe was released successfully

This commit is contained in:
otavepto 2023-12-18 14:45:35 +02:00
parent f397f73644
commit d02f32327e

View File

@ -241,12 +241,13 @@ HSteamPipe Steam_Client::CreateSteamPipe()
// Releases a previously created communications pipe
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
// "true if the pipe was valid and released successfully; otherwise, false"
// https://partner.steamgames.com/doc/api/ISteamClient
bool Steam_Client::BReleaseSteamPipe( HSteamPipe hSteamPipe )
{
PRINT_DEBUG("BReleaseSteamPipe %i\n", hSteamPipe);
if (steam_pipes.count(hSteamPipe)) {
steam_pipes.erase(hSteamPipe);
return true;
return steam_pipes.erase(hSteamPipe) > 0;
}
return false;