mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-08 07:05:40 +12:00
Add Discord RPC reloading
This commit is contained in:
parent
f5d46673ff
commit
4b841e6343
2 changed files with 15 additions and 0 deletions
|
@ -17,6 +17,8 @@ namespace Discord {
|
||||||
void init();
|
void init();
|
||||||
void update(RPCStatus status, const std::string& title);
|
void update(RPCStatus status, const std::string& title);
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
|
bool running() const { return enabled; }
|
||||||
};
|
};
|
||||||
} // namespace Discord
|
} // namespace Discord
|
||||||
|
|
||||||
|
|
|
@ -451,4 +451,17 @@ void Emulator::reloadSettings() {
|
||||||
if (Renderdoc::isSupported() && config.enableRenderdoc && !Renderdoc::isLoaded()) {
|
if (Renderdoc::isSupported() && config.enableRenderdoc && !Renderdoc::isLoaded()) {
|
||||||
loadRenderdoc();
|
loadRenderdoc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef PANDA3DS_ENABLE_DISCORD_RPC
|
||||||
|
// Reload RPC setting if we're compiling with RPC support
|
||||||
|
|
||||||
|
if (discordRpc.running() != config.discordRpcEnabled) {
|
||||||
|
if (config.discordRpcEnabled) {
|
||||||
|
discordRpc.init();
|
||||||
|
updateDiscord();
|
||||||
|
} else {
|
||||||
|
discordRpc.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue