discord_impl: Remove global system instances

This commit is contained in:
lat9nq
2021-09-03 20:16:20 -04:00
committed by Morph
parent 4ce53ffe6a
commit b6894bfc5b
3 changed files with 13 additions and 6 deletions

View File

@ -3431,7 +3431,7 @@ void GMainWindow::OnLanguageChanged(const QString& locale) {
void GMainWindow::SetDiscordEnabled([[maybe_unused]] bool state) {
#ifdef USE_DISCORD_PRESENCE
if (state) {
discord_rpc = std::make_unique<DiscordRPC::DiscordImpl>();
discord_rpc = std::make_unique<DiscordRPC::DiscordImpl>(system);
} else {
discord_rpc = std::make_unique<DiscordRPC::NullImpl>();
}