mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-24 09:24:15 +08:00
more accurate implementation for Steam_Client::BReleaseSteamPipe(), return true if the pipe was released successfully
This commit is contained in:
parent
f397f73644
commit
d02f32327e
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user