cmake: Allow disabling discord rpc (#1416)

This commit is contained in:
TheTurtle 2024-10-19 16:09:36 +03:00 committed by GitHub
parent c38e3f77f9
commit 0ecb6695de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 6 deletions

View file

@ -12,7 +12,9 @@
#include "common/memory_patcher.h"
#endif
#include "common/assert.h"
#ifdef ENABLE_DISCORD_RPC
#include "common/discord_rpc_handler.h"
#endif
#include "common/elf_info.h"
#include "common/ntapi.h"
#include "common/path_util.h"
@ -244,6 +246,7 @@ void Emulator::Run(const std::filesystem::path& file) {
}
}
#ifdef ENABLE_DISCORD_RPC
// Discord RPC
if (Config::getEnableDiscordRPC()) {
auto* rpc = Common::Singleton<DiscordRPCHandler::RPC>::Instance();
@ -252,6 +255,7 @@ void Emulator::Run(const std::filesystem::path& file) {
}
rpc->setStatusPlaying(game_info.title, id);
}
#endif
// start execution
std::jthread mainthread =