mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 04:29:13 +12:00
Add Discord RPC (#161)
* Add discord-rpc submodule * Add Discord RPC * Fix up Discord status * Fix CMake because MacOS sucks * Slightly less hacky fix
This commit is contained in:
parent
32ad43cb8e
commit
1c11e2df40
9 changed files with 145 additions and 8 deletions
|
@ -29,6 +29,15 @@ void EmulatorConfig::load(const std::filesystem::path& path) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (data.contains("General")) {
|
||||
auto generalResult = toml::expect<toml::value>(data.at("General"));
|
||||
if (generalResult.is_ok()) {
|
||||
auto general = generalResult.unwrap();
|
||||
|
||||
discordRpcEnabled = toml::find_or<toml::boolean>(general, "EnableDiscordRPC", false);
|
||||
}
|
||||
}
|
||||
|
||||
if (data.contains("GPU")) {
|
||||
auto gpuResult = toml::expect<toml::value>(data.at("GPU"));
|
||||
if (gpuResult.is_ok()) {
|
||||
|
@ -68,6 +77,7 @@ void EmulatorConfig::save(const std::filesystem::path& path) {
|
|||
printf("Saving new configuration file %s\n", path.string().c_str());
|
||||
}
|
||||
|
||||
data["General"]["EnableDiscordRPC"] = discordRpcEnabled;
|
||||
data["GPU"]["EnableShaderJIT"] = shaderJitEnabled;
|
||||
data["GPU"]["Renderer"] = std::string(Renderer::typeToString(rendererType));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue