summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar lat9nq2023-07-18 15:49:36 -0400
committerGravatar lat9nq2023-07-21 10:56:55 -0400
commit32116231924bfc1ad356fc0f39df327a393b8df1 (patch)
tree61ffe216c4246ee63f387169cc2eecb0dc80e216 /src
parentsettings_setting: Fix typo (diff)
downloadyuzu-32116231924bfc1ad356fc0f39df327a393b8df1.tar.gz
yuzu-32116231924bfc1ad356fc0f39df327a393b8df1.tar.xz
yuzu-32116231924bfc1ad356fc0f39df327a393b8df1.zip
common: Move global configuration state modifiers back to settings
Diffstat (limited to 'src')
-rw-r--r--src/common/settings.cpp10
-rw-r--r--src/common/settings.h3
-rw-r--r--src/common/settings_common.cpp10
-rw-r--r--src/common/settings_common.h3
-rw-r--r--src/yuzu/configuration/shared_widget.cpp1
5 files changed, 14 insertions, 13 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index 59d24a053..4c1cd1cac 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -287,4 +287,14 @@ void RestoreGlobalState(bool is_powered_on) {
287 } 287 }
288} 288}
289 289
290static bool configuring_global = true;
291
292bool IsConfiguringGlobal() {
293 return configuring_global;
294}
295
296void SetConfiguringGlobal(bool is_global) {
297 configuring_global = is_global;
298}
299
290} // namespace Settings 300} // namespace Settings
diff --git a/src/common/settings.h b/src/common/settings.h
index 618c34334..655f6468a 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -529,4 +529,7 @@ void UpdateRescalingInfo();
529// Restore the global state of all applicable settings in the Values struct 529// Restore the global state of all applicable settings in the Values struct
530void RestoreGlobalState(bool is_powered_on); 530void RestoreGlobalState(bool is_powered_on);
531 531
532bool IsConfiguringGlobal();
533void SetConfiguringGlobal(bool is_global);
534
532} // namespace Settings 535} // namespace Settings
diff --git a/src/common/settings_common.cpp b/src/common/settings_common.cpp
index 8b666f8b2..1439fb451 100644
--- a/src/common/settings_common.cpp
+++ b/src/common/settings_common.cpp
@@ -52,14 +52,4 @@ const std::string& BasicSetting::GetLabel() const {
52 return label; 52 return label;
53} 53}
54 54
55static bool configuring_global = true;
56
57bool IsConfiguringGlobal() {
58 return configuring_global;
59}
60
61void SetConfiguringGlobal(bool is_global) {
62 configuring_global = is_global;
63}
64
65} // namespace Settings 55} // namespace Settings
diff --git a/src/common/settings_common.h b/src/common/settings_common.h
index ca218e37b..a7630a97f 100644
--- a/src/common/settings_common.h
+++ b/src/common/settings_common.h
@@ -60,9 +60,6 @@ enum Specialization : u8 {
60 Percentage = (1 << SpecializationAttributeOffset), 60 Percentage = (1 << SpecializationAttributeOffset),
61}; 61};
62 62
63bool IsConfiguringGlobal();
64void SetConfiguringGlobal(bool is_global);
65
66class BasicSetting; 63class BasicSetting;
67 64
68class Linkage { 65class Linkage {
diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp
index ba7f60c2d..c9ab461f6 100644
--- a/src/yuzu/configuration/shared_widget.cpp
+++ b/src/yuzu/configuration/shared_widget.cpp
@@ -39,6 +39,7 @@
39#include "common/assert.h" 39#include "common/assert.h"
40#include "common/common_types.h" 40#include "common/common_types.h"
41#include "common/logging/log.h" 41#include "common/logging/log.h"
42#include "common/settings.h"
42#include "common/settings_common.h" 43#include "common/settings_common.h"
43#include "yuzu/configuration/shared_translation.h" 44#include "yuzu/configuration/shared_translation.h"
44 45