summaryrefslogtreecommitdiffstats
path: root/src/common/settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/settings.cpp')
-rw-r--r--src/common/settings.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index 84e90f893..10cdea844 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -7,10 +7,17 @@
#include <exception>
#include <stdexcept>
#endif
+#include <compare>
+#include <cstddef>
+#include <filesystem>
+#include <forward_list>
#include <functional>
#include <string_view>
+#include <type_traits>
+#include <fmt/core.h>
#include "common/assert.h"
+#include "common/fs/fs_util.h"
#include "common/fs/path_util.h"
#include "common/logging/log.h"
#include "common/settings.h"
@@ -18,6 +25,43 @@
namespace Settings {
+#define SETTING(TYPE, RANGED) template class Setting<TYPE, RANGED>
+#define SWITCHABLE(TYPE, RANGED) template class SwitchableSetting<TYPE, RANGED>
+
+SETTING(AudioEngine, false);
+SETTING(bool, false);
+SETTING(int, false);
+SETTING(std::string, false);
+SETTING(u16, false);
+SWITCHABLE(AnisotropyMode, true);
+SWITCHABLE(AntiAliasing, false);
+SWITCHABLE(AspectRatio, true);
+SWITCHABLE(AstcDecodeMode, true);
+SWITCHABLE(AstcRecompression, true);
+SWITCHABLE(AudioMode, true);
+SWITCHABLE(CpuAccuracy, true);
+SWITCHABLE(FullscreenMode, true);
+SWITCHABLE(GpuAccuracy, true);
+SWITCHABLE(Language, true);
+SWITCHABLE(NvdecEmulation, false);
+SWITCHABLE(Region, true);
+SWITCHABLE(RendererBackend, true);
+SWITCHABLE(ScalingFilter, false);
+SWITCHABLE(ShaderBackend, true);
+SWITCHABLE(TimeZone, true);
+SETTING(VSyncMode, true);
+SWITCHABLE(bool, false);
+SWITCHABLE(int, false);
+SWITCHABLE(int, true);
+SWITCHABLE(s64, false);
+SWITCHABLE(u16, true);
+SWITCHABLE(u32, false);
+SWITCHABLE(u8, false);
+SWITCHABLE(u8, true);
+
+#undef SETTING
+#undef SWITCHABLE
+
Values values;
static bool configuring_global = true;
@@ -238,6 +282,14 @@ void UpdateRescalingInfo() {
info.active = info.up_scale != 1 || info.down_shift != 0;
}
+std::string BasicSetting::ToStringGlobal() const {
+ return {};
+}
+
+bool BasicSetting::UsingGlobal() const {
+ return true;
+}
+
void RestoreGlobalState(bool is_powered_on) {
// If a game is running, DO NOT restore the global settings state
if (is_powered_on) {