Skip to content

[steam] Add SteamAPI_ISteamClient_BReleaseSteamPipe - #657

Open
peardox wants to merge 2 commits into
castle-engine:masterfrom
peardox:SteamPipe
Open

peardox wants to merge 2 commits into
castle-engine:masterfrom
peardox:SteamPipe

Conversation

@peardox

@peardox peardox commented Feb 9, 2025

Copy link
Copy Markdown
Collaborator

As discussed in #656

Small changes, add definition for SteamAPI_ISteamClient_BReleaseSteamPipe
Alter TCastleSteam.Destroy to call it in order to release the pipe (theoretically a resource leak)
No wrapping yet as it's only of any real use on Shutdown ATM (may be exposed later if required)

@michaliskambi

Copy link
Copy Markdown
Member

Than you, I'll look and test it soon!

@peardox

peardox commented Feb 10, 2025 •

Copy link
Copy Markdown
Collaborator Author

It's only 5 lines - not the biggest PR :)

I'd already written it so hopefully saved you a few mins

@michaliskambi

Copy link
Copy Markdown
Member

Sorry for a delay with this, I have this PR on a list of TODOs for next week. Thanks for the patience :)

(
I know, it's a short PR, but I do need to test whether it doesn't cause any regressions on the existing platforms, Linux, Windows, macOS.

If you want to help me speed it up, I will appreciate if you add a comment justifying the need for this to the source code , before the SteamAPI_ISteamClient_BReleaseSteamPipe. I recall you described it in one of the previous PRs, let's copy/adjust that description into a Pascal comment, so that it stays forever recorded. Like

  if Enabled then
  begin
    { Without doing SteamAPI_ISteamClient_BReleaseSteamPipe , an invalid behavior occurs when X. 
       Reproduce it by doing Y ...  }
    SteamAPI_ISteamClient_BReleaseSteamPipe(SteamClient, SteamPipeHandle);
    SteamAPI_Shutdown();
  end;

Thank you!
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants