aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorxbzk <xbzk@eden-emu.dev>2026-09-08 20:05:56 +0200
committercrueter <crueter@eden-emu.dev>2026-09-08 20:05:56 +0200
commitecb2ae4076817178ec8013f18d5291e3451da193 (patch)
tree2859e319eecb7fd3137efd274ba3818976cf1291 /src
parent753b57a8c242c1bba8d2be6e97aa10697abfdb15 (diff)
[settings] move program_args and debug_knobs back to debugging category and make them pergameable (#4378)
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions). - [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md) - [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability. ------------------- I have moved debug_knobs and program_args to System category, to make them pergameable without hassle. But the hassle came: They were automatically readded to Qt's System tab, doubling them. If it were to face hassle either way, the right thing is to move them back to Debugging category, then make them exceptionally pergameable. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4378 Reviewed-by: lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/common/settings.h4
-rw-r--r--src/frontend_common/config.cpp32
2 files changed, 23 insertions, 13 deletions
diff --git a/src/common/settings.h b/src/common/settings.h
index 60cf874306..d45f0b7bbc 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -858,7 +858,7 @@ struct Values {
SwitchableSetting<std::string> program_args{linkage,
std::string(),
"program_args",
- Category::System,
+ Category::Debugging,
Specialization::Default,
true, // save_ - persist in config file
false}; // runtime_modifiable_ - startup-only
@@ -904,7 +904,7 @@ struct Values {
0,
65535,
"debug_knobs",
- Category::System,
+ Category::Debugging,
Specialization::Countable,
true,
true};
diff --git a/src/frontend_common/config.cpp b/src/frontend_common/config.cpp
index b44a146b38..f61192dfae 100644
--- a/src/frontend_common/config.cpp
+++ b/src/frontend_common/config.cpp
@@ -299,12 +299,17 @@ void Config::ReadDataStorageValues() {
void Config::ReadDebuggingValues() {
BeginGroup(Settings::TranslateCategory(Settings::Category::Debugging));
- // Intentionally not using the QT default setting as this is intended to be changed in the ini
- Settings::values.record_frame_times =
- ReadBooleanSetting(std::string("record_frame_times"), std::make_optional(false));
+ if (global) {
+ // Intentionally not using the QT default setting as this is intended to be changed in the ini
+ Settings::values.record_frame_times =
+ ReadBooleanSetting(std::string("record_frame_times"), std::make_optional(false));
- ReadCategory(Settings::Category::Debugging);
- ReadCategory(Settings::Category::DebuggingGraphics);
+ ReadCategory(Settings::Category::Debugging);
+ ReadCategory(Settings::Category::DebuggingGraphics);
+ } else {
+ ReadSettingGeneric(&Settings::values.program_args);
+ ReadSettingGeneric(&Settings::values.debug_knobs);
+ }
EndGroup();
}
@@ -415,12 +420,12 @@ void Config::ReadLibraryAppletValues() {
void Config::ReadValues() {
if (global) {
ReadDataStorageValues();
- ReadDebuggingValues();
ReadDisabledAddOnValues();
ReadServiceValues();
ReadWebServiceValues();
ReadMiscellaneousValues();
}
+ ReadDebuggingValues();
ReadLibraryAppletValues();
ReadNetworkValues();
ReadControlValues();
@@ -511,13 +516,13 @@ void Config::SaveValues() {
if (global) {
LOG_DEBUG(Config, "Saving global generic configuration values");
SaveDataStorageValues();
- SaveDebuggingValues();
SaveDisabledAddOnValues();
SaveWebServiceValues();
SaveMiscellaneousValues();
} else {
LOG_DEBUG(Config, "Saving only generic configuration values");
}
+ SaveDebuggingValues();
SaveLibraryAppletValues();
SaveNetworkValues();
SaveControlValues();
@@ -600,11 +605,16 @@ void Config::SaveDataStorageValues() {
void Config::SaveDebuggingValues() {
BeginGroup(Settings::TranslateCategory(Settings::Category::Debugging));
- // Intentionally not using the QT default setting as this is intended to be changed in the ini
- WriteBooleanSetting(std::string("record_frame_times"), Settings::values.record_frame_times);
+ if (global) {
+ // Intentionally not using the QT default setting as this is intended to be changed in the ini
+ WriteBooleanSetting(std::string("record_frame_times"), Settings::values.record_frame_times);
- WriteCategory(Settings::Category::Debugging);
- WriteCategory(Settings::Category::DebuggingGraphics);
+ WriteCategory(Settings::Category::Debugging);
+ WriteCategory(Settings::Category::DebuggingGraphics);
+ } else {
+ WriteSettingGeneric(&Settings::values.program_args);
+ WriteSettingGeneric(&Settings::values.debug_knobs);
+ }
EndGroup();
}