Lachee / discord-rpc-csharp

C# custom implementation for Discord Rich Presence. Not deprecated and still available!
MIT License
593 stars 100 forks source link

Steam apps fail to launch through Discord on Windows. #99

Open Tyaap opened 4 years ago

Tyaap commented 4 years ago

To Reproduce I am using a Steam app ID to register a URI scheme, like this: client.RegisterUriScheme(steamAppID: "212480")

Expected behavior The app should launch when e.g. clicking a join link through Discord, but it does not.

Desktop

Additional context I have narrowed down the cause of the problem: The URI generated in WindowsUriSchemeCreator.cs is retrieving the Steam exe location from Software\\Valve\\Steam\\SteamExe in the registry. In my case it retrieved c:/Program Files (x86)/Steam/steam.exe. Windows seems to misinterpret c:/ and fails to execute the URI command. I manually replaced this with c:\ using Regedit and the URI command was able to execute.

Tyaap commented 4 years ago

I currently have a workaround, which is to register the URI scheme like this: client.RegisterUriScheme(executable: "explorer steam://rungameid/212480")

Lachee commented 4 years ago

huh what a strange bug. Im not entirely sure if its a steam install issue or this library issue, as correctly installed paths should use \ instead of / for the directory separator.

Your fix is certainly interesting and im not entirely sure what it is doing.

DoubleBullet commented 3 years ago

I have the same problem. Do you guys have a discord server for support?

Lachee commented 3 years ago

I have the same problem. Do you guys have a discord server for support?

No, this github is the best place to get support. Can you provide the location that your steam directory is installed under?

DoubleBullet commented 3 years ago

I have the same problem. Do you guys have a discord server for support?

No, this github is the best place to get support. Can you provide the location that your steam directory is installed under?

For me it's under C:\Program Files (x86)\Steam . The game is installed a different folder under a different hard drive.

I mainly just want to pass in this command "steam://joinlobby/{SteamAppID}/{LobbyID}/{UserID}". For now I've manually setup a button to which has that command as the URL and it works if you click on it, but I want the same for the Join/Request to Join feature inside of Discord. Currently nothing happens when trying to send that over to the Register.

DoubleBullet commented 3 years ago

Did this ever get fixed?

HAHOOS commented 3 years ago

idk, as i know owner is AFK idk