mirror of
https://github.com/patchzyy/wiicompiled
synced 2026-09-28 15:29:25 -04:00
Merge pull request #109 from DarthMDev/discord-rich-presence
feat: add basic Discord rich presence support
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
#include "system_bridge.h"
|
||||
#include "ppc_runtime.h"
|
||||
#include "aurora_events.h"
|
||||
#include "discord_presence.h"
|
||||
#include "fiber_manager.h"
|
||||
#include "hle_stubs.h"
|
||||
#include "runtime_config.h"
|
||||
@@ -1315,6 +1316,9 @@ int RuntimeMain(int argc, char** argv) {
|
||||
throw std::invalid_argument("The game runtime does not accept command-line options; use Config.toml through the installed host.");
|
||||
}
|
||||
RuntimeConfigFile::LogLoadedConfig();
|
||||
if (RuntimeConfigFile::DiscordPresenceEnabled()) {
|
||||
DiscordPresence::Initialize(RuntimeConfigFile::DiscordClientId(), "Mario Kart Wii");
|
||||
}
|
||||
SystemBridge::Initialize();
|
||||
TranslatedFunctionRegistry::Finalize();
|
||||
|
||||
@@ -1441,6 +1445,7 @@ int RuntimeMain(int argc, char** argv) {
|
||||
Fiber::GuestFiberManager::Shutdown();
|
||||
WindowPlacementPersistence::Flush(true);
|
||||
aurora_shutdown();
|
||||
DiscordPresence::Shutdown();
|
||||
SetRuntimeExitCodeImpl(0);
|
||||
ShutdownProcessTranscript();
|
||||
return 0;
|
||||
@@ -1458,6 +1463,7 @@ int RuntimeMain(int argc, char** argv) {
|
||||
Fiber::GuestFiberManager::Shutdown();
|
||||
WindowPlacementPersistence::Flush(true);
|
||||
aurora_shutdown();
|
||||
DiscordPresence::Shutdown();
|
||||
ShutdownProcessTranscript();
|
||||
return 1;
|
||||
} catch (const std::exception& ex) {
|
||||
@@ -1469,6 +1475,7 @@ int RuntimeMain(int argc, char** argv) {
|
||||
Fiber::GuestFiberManager::Shutdown();
|
||||
WindowPlacementPersistence::Flush(true);
|
||||
aurora_shutdown();
|
||||
DiscordPresence::Shutdown();
|
||||
ShutdownProcessTranscript();
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user