Add option to disable Discord Presence in Qt UI
This commit is contained in:
@@ -19,6 +19,10 @@
|
||||
#include "DolphinQt2/Settings.h"
|
||||
#include "InputCommon/InputConfig.h"
|
||||
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
#include "UICommon/DiscordPresence.h"
|
||||
#endif
|
||||
|
||||
Settings::Settings()
|
||||
{
|
||||
qRegisterMetaType<Core::State>();
|
||||
@@ -476,3 +480,19 @@ void Settings::SetBatchModeEnabled(bool batch)
|
||||
{
|
||||
m_batch = batch;
|
||||
}
|
||||
|
||||
#ifdef USE_DISCORD_PRESENCE
|
||||
void Settings::SetDiscordPresenceEnabled(bool enabled)
|
||||
{
|
||||
if (SConfig::GetInstance().bUseDiscordPresence == enabled)
|
||||
return;
|
||||
|
||||
if (SConfig::GetInstance().bUseDiscordPresence)
|
||||
Discord::Shutdown();
|
||||
|
||||
SConfig::GetInstance().bUseDiscordPresence = enabled;
|
||||
|
||||
if (SConfig::GetInstance().bUseDiscordPresence)
|
||||
Discord::Init();
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user