Fix build when -DENABLE_DISCORD_RPC=OFF (#1551)

* added ifdef for discordrpc

* replaced discordrpc include correctly
This commit is contained in:
Alexander Y. 2024-11-20 07:41:35 +01:00 committed by GitHub
parent 17c47bcd96
commit 9f42a12baf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 3 deletions

View file

@ -173,6 +173,7 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
BackgroundMusicPlayer::getInstance().setVolume(val);
});
#ifdef ENABLE_DISCORD_RPC
connect(ui->discordRPCCheckbox, &QCheckBox::stateChanged, this, [](int val) {
Config::setEnableDiscordRPC(val);
auto* rpc = Common::Singleton<DiscordRPCHandler::RPC>::Instance();
@ -183,6 +184,7 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
rpc->shutdown();
}
});
#endif
}
// Input TAB