[App] Fix dangling ptr in Discord playing update.

[App] Fix dangling pointer in Discord playing update. Fixes #1621.
This commit is contained in:
gibbed 2020-11-15 13:57:13 -06:00 committed by Rick Gibbed
parent e848a20c23
commit a4e5c4cecf
1 changed files with 2 additions and 1 deletions

View File

@ -40,9 +40,10 @@ void DiscordPresence::NotPlaying() {
}
void DiscordPresence::PlayingTitle(const std::string_view game_title) {
auto details = std::string(game_title);
DiscordRichPresence discordPresence = {};
discordPresence.state = "In Game";
discordPresence.details = std::string(game_title).c_str();
discordPresence.details = details.c_str();
// TODO(gibbed): we don't have state icons yet.
// discordPresence.smallImageKey = "app";
// discordPresence.largeImageKey = "state_ingame";