New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Discord presence ioctlv to /dev/dolphin #10940
Conversation
|
This is a neat idea, and certainly seems like something that would be useful to have in There are some formatting issues (see the lint builder output, and also check contributing.md for notes on variable name conventions), but the actual logic looks reasonable. I don't have much experience with the discord code myself though. There are a few link issues with the unittests project (which does not have a dependency on UICommon, where |
|
We don't want to make core dependant on UICommon Might need to introduce a |
I was going to approach this by adding USE_DISCORD_PRESENCE as a compile time flag passed to core (like it is to UICommon), which would prevent calls to DiscordPresence existing in core at compile time, but that would still mean there is a situation where core depends on UICommon to build. |
|
Even if you can get it building with our current set of targets (because static libraries don't correctly block implicit dependencies), I'm going to have to insist that you don't introduce a dependency from Core to UICommon.
|
|
Could you squash these down to just one or two commits? Other than that, this looks fine to me. |
5543dad
to
f9e39cf
Compare
This adds ioctlvs to /dev/dolphin that allows a game mod or homebrew running under Dolphin to set custom Discord rich presence client IDs and statuses. This can be used for mods to show more context about what's being done in-game (what stage/track/song is being played in-game, the user's current star/coin progress, etc) to the user's Discord status.
The basic flow is as follows:
If guest software attempts to call IOCTL_DOLPHIN_DISCORD_SET_PRESENCE without setting a client ID, it will fail with IPC_EACCES, as will all of the requests if Discord status is disabled in Dolphin's configuration.
For testing and example purposes, I've made a quick homebrew application that makes the set client + set presence requests: https://github.com/InvoxiPlayGames/dolphin-discord-test