Discord Rich Presence CMake integration

I have no idea if this works or not. Hopefully the build bot will tell me.
This commit is contained in:
yourWaifu
2018-06-08 15:56:11 -05:00
committed by Sleepy Flower Girl
parent 57bd13a0ce
commit 63f03455f3
19 changed files with 98 additions and 59 deletions

View File

@ -218,3 +218,7 @@ if(APPLE)
else()
install(TARGETS dolphin-emu RUNTIME DESTINATION ${bindir})
endif()
if(USE_DISCORD_PRESENCE)
target_compile_definitions(dolphin-emu PRIVATE -DUSE_DISCORD_PRESENCE)
endif()

View File

@ -19,10 +19,6 @@
#include "DolphinQt2/Settings.h"
#include "InputCommon/InputConfig.h"
#ifdef USE_DISCORD_PRESENCE
#include "UICommon/DiscordPresence.h"
#endif
Settings::Settings()
{
qRegisterMetaType<Core::State>();

View File

@ -19,6 +19,7 @@
#include <QWidget>
#include "Core/Analytics.h"
#include "Core/Config/UISettings.h"
#include "Core/ConfigManager.h"
#include "Core/Core.h"
#include "Core/PowerPC/PowerPC.h"
@ -227,7 +228,7 @@ void GeneralPane::LoadConfig()
m_checkbox_dualcore->setChecked(SConfig::GetInstance().bCPUThread);
m_checkbox_cheats->setChecked(Settings::Instance().GetCheatsEnabled());
#ifdef USE_DISCORD_PRESENCE
m_checkbox_discord_presence->setChecked(Config::Get(MAIN_USE_DISCORD_PRESENCE));
m_checkbox_discord_presence->setChecked(Config::Get(Config::MAIN_USE_DISCORD_PRESENCE));
#endif
int selection = qRound(SConfig::GetInstance().m_EmulationSpeed * 10);
if (selection < m_combobox_speedlimit->count())