diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-06-11 05:40:39 +0200 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-07-21 16:56:54 +0200 |
commit | 04d4b6ab802a1238eaca6c0a16d1a739503b81d9 (patch) | |
tree | 2e4c850092b6d6f5f50e3a6a648a217e3c7a283c /src/common/settings.cpp | |
parent | settings: Remove redundant false literals (diff) | |
download | yuzu-04d4b6ab802a1238eaca6c0a16d1a739503b81d9.tar yuzu-04d4b6ab802a1238eaca6c0a16d1a739503b81d9.tar.gz yuzu-04d4b6ab802a1238eaca6c0a16d1a739503b81d9.tar.bz2 yuzu-04d4b6ab802a1238eaca6c0a16d1a739503b81d9.tar.lz yuzu-04d4b6ab802a1238eaca6c0a16d1a739503b81d9.tar.xz yuzu-04d4b6ab802a1238eaca6c0a16d1a739503b81d9.tar.zst yuzu-04d4b6ab802a1238eaca6c0a16d1a739503b81d9.zip |
Diffstat (limited to 'src/common/settings.cpp')
-rw-r--r-- | src/common/settings.cpp | 52 |
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) { |