discord_impl: Remove global system instances

This commit is contained in:
lat9nq 2021-09-03 20:16:20 -04:00 committed by Morph
parent b6387b3e2f
commit aeab40e338
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>();
}