mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-14 03:07:08 +12:00
[WIP] Qt: Add config window controls (#655)
* Qt: Add config window controls * Fix Windows build * Fix audio slider * Qt configs: Make thread-safe, properly update audio enable & renderdoc settings * Qt configs: Add `connectCheckbox` function * Qt configs: Add `connectCheckbox` function * Rename spuLayout * Add Discord RPC reloading * Allow configuring the app icon * Qt: Serialize icon & theme, properly set them * Add rnap and rcow icons * Qt: Fix forceShadergen config --------- Co-authored-by: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com>
This commit is contained in:
parent
c2b479889c
commit
156328fbfb
22 changed files with 509 additions and 25 deletions
|
@ -130,6 +130,16 @@ void EmulatorConfig::load() {
|
|||
sdWriteProtected = toml::find_or<toml::boolean>(sd, "WriteProtectVirtualSD", false);
|
||||
}
|
||||
}
|
||||
|
||||
if (data.contains("UI")) {
|
||||
auto uiResult = toml::expect<toml::value>(data.at("UI"));
|
||||
if (uiResult.is_ok()) {
|
||||
auto ui = uiResult.unwrap();
|
||||
|
||||
frontendSettings.theme = FrontendSettings::themeFromString(toml::find_or<std::string>(ui, "Theme", "dark"));
|
||||
frontendSettings.icon = FrontendSettings::iconFromString(toml::find_or<std::string>(ui, "WindowIcon", "rpog"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EmulatorConfig::save() {
|
||||
|
@ -186,6 +196,9 @@ void EmulatorConfig::save() {
|
|||
data["SD"]["UseVirtualSD"] = sdCardInserted;
|
||||
data["SD"]["WriteProtectVirtualSD"] = sdWriteProtected;
|
||||
|
||||
data["UI"]["Theme"] = std::string(FrontendSettings::themeToString(frontendSettings.theme));
|
||||
data["UI"]["WindowIcon"] = std::string(FrontendSettings::iconToString(frontendSettings.icon));
|
||||
|
||||
std::ofstream file(path, std::ios::out);
|
||||
file << data;
|
||||
file.close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue