Namespace containing things related to Discord Rich Presence.
More...
Namespace containing things related to Discord Rich Presence.
- Todo:
- The
.cpp
file for this needs some cleanup, as it was written in the earlier days of the Blamite codebase.
- Bug:
- Game join events never fire. This may be a bug with our implementation or a bug with DiscordRPC itself.
◆ DummyEvent()
void Blam::DiscordRPC::DummyEvent |
( |
int |
id | ) |
|
Triggers a dummy event.
- Parameters
-
id | - The event type to trigger. Available options include:
- 1 - User logon
- 2 - Error
- 3 - User disconnect
- 4 - Join game
- 5 - Spectate game
- 6 - Join request
|
- Todo:
- Change this to use an enum instead of relying on an integer.
◆ InitDiscord()
void Blam::DiscordRPC::InitDiscord |
( |
| ) |
|
◆ ShutdownDiscord()
void Blam::DiscordRPC::ShutdownDiscord |
( |
| ) |
|
◆ UpdatePresence() [1/2]
void Blam::DiscordRPC::UpdatePresence |
( |
const char * |
state, |
|
|
const char * |
details |
|
) |
| |
Update the current Discord presence state and details.
- Parameters
-
state | - The new game state. Ex: "Forge World" |
details | - The new activity details. Ex: "Using the Forge" |
◆ UpdatePresence() [2/2]
void Blam::DiscordRPC::UpdatePresence |
( |
DiscordRichPresence |
discordPresence | ) |
|
Update the current Discord presence.
- Parameters
-
discordPresence | - The new presence data to use. |