From d02f32327e57d63320b367c99f181bd79e51d182 Mon Sep 17 00:00:00 2001 From: otavepto Date: Mon, 18 Dec 2023 14:45:35 +0200 Subject: [PATCH] more accurate implementation for Steam_Client::BReleaseSteamPipe(), return true if the pipe was released successfully --- dll/steam_client.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dll/steam_client.cpp b/dll/steam_client.cpp index 2ae8c16e..746f4baa 100644 --- a/dll/steam_client.cpp +++ b/dll/steam_client.cpp @@ -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;