summaryrefslogtreecommitdiffstats
path: root/src/common/settings.h
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-05-18 23:54:22 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-07-21 16:56:07 +0200
commit432f68ad29df7a368ba375d75d667c954e9c80b9 (patch)
treec09b7f5ae90f30e074ff6823a6e361329b71af2e /src/common/settings.h
parentsettings: Split enums to new file (diff)
downloadyuzu-432f68ad29df7a368ba375d75d667c954e9c80b9.tar
yuzu-432f68ad29df7a368ba375d75d667c954e9c80b9.tar.gz
yuzu-432f68ad29df7a368ba375d75d667c954e9c80b9.tar.bz2
yuzu-432f68ad29df7a368ba375d75d667c954e9c80b9.tar.lz
yuzu-432f68ad29df7a368ba375d75d667c954e9c80b9.tar.xz
yuzu-432f68ad29df7a368ba375d75d667c954e9c80b9.tar.zst
yuzu-432f68ad29df7a368ba375d75d667c954e9c80b9.zip
Diffstat (limited to '')
-rw-r--r--src/common/settings.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/common/settings.h b/src/common/settings.h
index 0ac5078c6..d4b41a162 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -244,6 +244,8 @@ protected:
return value_.has_value() ? std::to_string(*value_) : "none";
} else if constexpr (std::is_same<Type, bool>()) {
return value_ ? "true" : "false";
+ } else if (std::is_same<Type, AudioEngine>()) {
+ return TranslateEnum(value_);
} else {
return std::to_string(static_cast<u64>(value_));
}
@@ -309,6 +311,8 @@ public:
this->SetValue(static_cast<u32>(std::stoul(input)));
} else if constexpr (std::is_same<Type, bool>()) {
this->SetValue(input == "true");
+ } else if constexpr (std::is_same<Type, AudioEngine>()) {
+ this->SetValue(ToEnum<Type>(input));
} else {
this->SetValue(static_cast<Type>(std::stoll(input)));
}
@@ -542,7 +546,7 @@ struct Values {
Linkage linkage{};
// Audio
- Setting<std::string> sink_id{linkage, "auto", "output_engine", Category::Audio};
+ Setting<AudioEngine> sink_id{linkage, AudioEngine::Auto, "output_engine", Category::Audio};
Setting<std::string> audio_output_device_id{linkage, "auto", "output_device", Category::Audio};
Setting<std::string> audio_input_device_id{linkage, "auto", "input_device", Category::Audio};
Setting<bool, false> audio_muted{linkage, false, "audio_muted", Category::Audio, false};
@@ -731,8 +735,9 @@ struct Values {
SwitchableSetting<TimeZone, true> time_zone_index{linkage, TimeZone::Auto,
TimeZone::Auto, TimeZone::Zulu,
"time_zone_index", Category::System};
- SwitchableSetting<s32, true> sound_index{
- linkage, 1, 0, 2, "sound_index", Category::SystemAudio};
+ SwitchableSetting<AudioMode, true> sound_index{linkage, AudioMode::Stereo,
+ AudioMode::Mono, AudioMode::Surround,
+ "sound_index", Category::SystemAudio};
SwitchableSetting<bool> use_docked_mode{linkage, true, "use_docked_mode", Category::System};