diff options
| author | 2023-06-21 04:32:13 -0400 | |
|---|---|---|
| committer | 2023-07-21 10:56:55 -0400 | |
| commit | 7f708e8d77fb6237407f49246622dbe1b445d536 (patch) | |
| tree | 454602f59a51763b12e4952046fbd0bdf47bd4ec /src/common/settings_common.cpp | |
| parent | shared_widget: Internalize component restoring (diff) | |
| download | yuzu-7f708e8d77fb6237407f49246622dbe1b445d536.tar.gz yuzu-7f708e8d77fb6237407f49246622dbe1b445d536.tar.xz yuzu-7f708e8d77fb6237407f49246622dbe1b445d536.zip | |
settings: Define paired settings
settings_common: Remove unused optional
Diffstat (limited to '')
| -rw-r--r-- | src/common/settings_common.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common/settings_common.cpp b/src/common/settings_common.cpp index 3e86c7347..53d4548f5 100644 --- a/src/common/settings_common.cpp +++ b/src/common/settings_common.cpp | |||
| @@ -8,9 +8,10 @@ namespace Settings { | |||
| 8 | 8 | ||
| 9 | BasicSetting::BasicSetting(Linkage& linkage, const std::string& name, enum Category category_, | 9 | BasicSetting::BasicSetting(Linkage& linkage, const std::string& name, enum Category category_, |
| 10 | bool save_, bool runtime_modifiable_, | 10 | bool save_, bool runtime_modifiable_, |
| 11 | enum Specialization specialization_) | 11 | enum Specialization specialization_, BasicSetting* other_setting_) |
| 12 | : label{name}, category{category_}, id{linkage.count}, save{save_}, | 12 | : label{name}, category{category_}, id{linkage.count}, save{save_}, |
| 13 | runtime_modifiable{runtime_modifiable_}, specialization{specialization_} { | 13 | runtime_modifiable{runtime_modifiable_}, specialization{specialization_}, |
| 14 | other_setting{other_setting_} { | ||
| 14 | linkage.by_category[category].push_front(this); | 15 | linkage.by_category[category].push_front(this); |
| 15 | linkage.count++; | 16 | linkage.count++; |
| 16 | } | 17 | } |
| @@ -43,6 +44,10 @@ Specialization BasicSetting::Specialization() const { | |||
| 43 | return specialization; | 44 | return specialization; |
| 44 | } | 45 | } |
| 45 | 46 | ||
| 47 | BasicSetting* BasicSetting::PairedSetting() const { | ||
| 48 | return other_setting; | ||
| 49 | } | ||
| 50 | |||
| 46 | const std::string& BasicSetting::GetLabel() const { | 51 | const std::string& BasicSetting::GetLabel() const { |
| 47 | return label; | 52 | return label; |
| 48 | } | 53 | } |