JnCrMx / discord-game-sdk4j

Java bindings for Discord's Game SDK
MIT License
121 stars 23 forks source link

Suggest an alternative path to discord ipc pipe on windows #81

Closed immails closed 5 months ago

immails commented 6 months ago

I was getting java.lang.RuntimeException: java.io.FileNotFoundException: pipe\discord-ipc-0 (The system cannot find the path specified) on my windows instance. i've done quick research and find out that "\\\\?\\pipe\\discord-ipc-"+i may be not the only path to the discord ipc pipe. So I've added an exceptional pipe path: "\\\\.\\\\pipe\\\\discord-ipc-" + i in the code. Now it checks if original path exists and sets alternative path if not.

The pull requested code was tested on Windows 11 23H2

letorbi commented 6 months ago

It seems that this PR is related to issue #79. The discussion there suggest that just changing path in line 20 to "\\\\.\\pipe\\discord-ipc-"+i could solve the problem.

Maybe we don't need an additional path check, but only a change in line 20. Could you test that?

immails commented 6 months ago

It will work indeed, as i tested it several times before. I just thought it could break something on other versions of Windows OS, but it seems like a general issue. But I'll remove the additional lines (to make changes on line 20) & test it once again to make sure.

immails commented 6 months ago

Seems to be working

JnCrMx commented 5 months ago

Thank you for fixing this and sorry for merging it so late :/

immails commented 5 months ago

no problem, thank you