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
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