mirror of
https://github.com/open-goal/jak-project
synced 2026-07-09 06:53:45 -04:00
g/jak2: initial Discord RPC implementation (#2100)
Notable things: - This assert is hit when trying to save the pc-settings file, NYI https://github.com/open-goal/jak-project/blob/e630b506903d7f7028dff89702be7f586c2120e7/game/kernel/common/Symbol4.h#L14 so right now settings aren't persisted. But RPC defaults to on - The existing functions can probably be made generic based off the game version, but I didn't spend time refactoring them yet as they aren't really ready to be used in jak 2 yet (we have no screenshots for the levels for example)
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "common/util/FileUtil.h"
|
||||
#include "common/versions.h"
|
||||
|
||||
#include "game/discord.h"
|
||||
#include "game/graphics/gfx.h"
|
||||
#include "game/kernel/common/fileio.h"
|
||||
#include "game/kernel/common/kdgo.h"
|
||||
@@ -329,6 +330,10 @@ RuntimeExitStatus exec_runtime(int argc, char** argv) {
|
||||
}
|
||||
}
|
||||
|
||||
// set up discord stuff
|
||||
gStartTime = time(nullptr);
|
||||
init_discord_rpc();
|
||||
|
||||
// initialize graphics first - the EE code will upload textures during boot and we
|
||||
// want the graphics system to catch them.
|
||||
if (enable_display) {
|
||||
@@ -385,5 +390,6 @@ RuntimeExitStatus exec_runtime(int argc, char** argv) {
|
||||
}
|
||||
lg::info("GOAL Runtime Shutdown (code {})", fmt::underlying(MasterExit));
|
||||
munmap(g_ee_main_mem, EE_MAIN_MEM_SIZE);
|
||||
Discord_Shutdown();
|
||||
return MasterExit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user