Răsfoiți Sursa

settings_setting: Don't remove the AudioEngine workaround

lat9nq 2 ani în urmă
părinte
comite
fe70c6f481
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      src/common/settings_setting.h

+ 3 - 0
src/common/settings_setting.h

@@ -113,6 +113,9 @@ protected:
             return value_.has_value() ? std::to_string(*value_) : "none";
         } else if constexpr (std::is_same_v<Type, bool>) {
             return value_ ? "true" : "false";
+        } else if constexpr (std::is_same_v<Type, AudioEngine>) {
+            // Compatibility with old AudioEngine setting being a string
+            return CanonicalizeEnum(value_);
         } else if constexpr (std::is_floating_point_v<Type>) {
             return fmt::format("{:f}", value_);
         } else if constexpr (std::is_enum_v<Type>) {