diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/settings.cpp | 2 | ||||
| -rw-r--r-- | src/common/settings.h | 10 | ||||
| -rw-r--r-- | src/common/uuid.h | 5 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp index e1973af85..bf5514386 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp | |||
| @@ -103,7 +103,7 @@ float Volume() { | |||
| 103 | if (values.audio_muted) { | 103 | if (values.audio_muted) { |
| 104 | return 0.0f; | 104 | return 0.0f; |
| 105 | } | 105 | } |
| 106 | return values.volume.GetValue(); | 106 | return values.volume.GetValue() / 100.0f; |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | void RestoreGlobalState(bool is_powered_on) { | 109 | void RestoreGlobalState(bool is_powered_on) { |
diff --git a/src/common/settings.h b/src/common/settings.h index 71d0f864f..ce1bc647d 100644 --- a/src/common/settings.h +++ b/src/common/settings.h | |||
| @@ -278,7 +278,7 @@ struct Values { | |||
| 278 | BasicSetting<std::string> sink_id{"auto", "output_engine"}; | 278 | BasicSetting<std::string> sink_id{"auto", "output_engine"}; |
| 279 | BasicSetting<bool> audio_muted{false, "audio_muted"}; | 279 | BasicSetting<bool> audio_muted{false, "audio_muted"}; |
| 280 | Setting<bool> enable_audio_stretching{true, "enable_audio_stretching"}; | 280 | Setting<bool> enable_audio_stretching{true, "enable_audio_stretching"}; |
| 281 | Setting<float> volume{1.0f, "volume"}; | 281 | Setting<u8> volume{100, "volume"}; |
| 282 | 282 | ||
| 283 | // Core | 283 | // Core |
| 284 | Setting<bool> use_multi_core{true, "use_multi_core"}; | 284 | Setting<bool> use_multi_core{true, "use_multi_core"}; |
| @@ -336,9 +336,9 @@ struct Values { | |||
| 336 | Setting<bool> use_fast_gpu_time{true, "use_fast_gpu_time"}; | 336 | Setting<bool> use_fast_gpu_time{true, "use_fast_gpu_time"}; |
| 337 | Setting<bool> use_caches_gc{false, "use_caches_gc"}; | 337 | Setting<bool> use_caches_gc{false, "use_caches_gc"}; |
| 338 | 338 | ||
| 339 | Setting<float> bg_red{0.0f, "bg_red"}; | 339 | Setting<u8> bg_red{0, "bg_red"}; |
| 340 | Setting<float> bg_green{0.0f, "bg_green"}; | 340 | Setting<u8> bg_green{0, "bg_green"}; |
| 341 | Setting<float> bg_blue{0.0f, "bg_blue"}; | 341 | Setting<u8> bg_blue{0, "bg_blue"}; |
| 342 | 342 | ||
| 343 | // System | 343 | // System |
| 344 | Setting<std::optional<u32>> rng_seed{std::optional<u32>(), "rng_seed"}; | 344 | Setting<std::optional<u32>> rng_seed{std::optional<u32>(), "rng_seed"}; |
| @@ -368,7 +368,7 @@ struct Values { | |||
| 368 | "udp_input_servers"}; | 368 | "udp_input_servers"}; |
| 369 | 369 | ||
| 370 | BasicSetting<bool> mouse_panning{false, "mouse_panning"}; | 370 | BasicSetting<bool> mouse_panning{false, "mouse_panning"}; |
| 371 | BasicSetting<float> mouse_panning_sensitivity{1.0f, "mouse_panning_sensitivity"}; | 371 | BasicSetting<u8> mouse_panning_sensitivity{10, "mouse_panning_sensitivity"}; |
| 372 | BasicSetting<bool> mouse_enabled{false, "mouse_enabled"}; | 372 | BasicSetting<bool> mouse_enabled{false, "mouse_enabled"}; |
| 373 | std::string mouse_device; | 373 | std::string mouse_device; |
| 374 | MouseButtonsRaw mouse_buttons; | 374 | MouseButtonsRaw mouse_buttons; |
diff --git a/src/common/uuid.h b/src/common/uuid.h index 2e7a18405..0ffa37e7c 100644 --- a/src/common/uuid.h +++ b/src/common/uuid.h | |||
| @@ -20,12 +20,11 @@ struct UUID { | |||
| 20 | constexpr explicit UUID(const u64 lo, const u64 hi) : uuid{{lo, hi}} {} | 20 | constexpr explicit UUID(const u64 lo, const u64 hi) : uuid{{lo, hi}} {} |
| 21 | 21 | ||
| 22 | [[nodiscard]] constexpr explicit operator bool() const { | 22 | [[nodiscard]] constexpr explicit operator bool() const { |
| 23 | return uuid[0] != INVALID_UUID[0] && uuid[1] != INVALID_UUID[1]; | 23 | return uuid != INVALID_UUID; |
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | [[nodiscard]] constexpr bool operator==(const UUID& rhs) const { | 26 | [[nodiscard]] constexpr bool operator==(const UUID& rhs) const { |
| 27 | // TODO(DarkLordZach): Replace with uuid == rhs.uuid with C++20 | 27 | return uuid == rhs.uuid; |
| 28 | return uuid[0] == rhs.uuid[0] && uuid[1] == rhs.uuid[1]; | ||
| 29 | } | 28 | } |
| 30 | 29 | ||
| 31 | [[nodiscard]] constexpr bool operator!=(const UUID& rhs) const { | 30 | [[nodiscard]] constexpr bool operator!=(const UUID& rhs) const { |