diff --git a/src/common/types.cpp b/src/common/types.cpp index 6d07954..f4d1547 100644 --- a/src/common/types.cpp +++ b/src/common/types.cpp @@ -45,8 +45,7 @@ namespace display_device { } // ---- Verify fixed header - if (static const std::array fixed_header {std::byte {0x00}, std::byte {0xFF}, std::byte {0xFF}, std::byte {0xFF}, std::byte {0xFF}, std::byte {0xFF}, std::byte {0xFF}, std::byte {0x00}}; - !std::equal(std::begin(fixed_header), std::end(fixed_header), std::begin(data))) { + if (static const std::array fixed_header {std::byte {0x00}, std::byte {0xFF}, std::byte {0xFF}, std::byte {0xFF}, std::byte {0xFF}, std::byte {0xFF}, std::byte {0xFF}, std::byte {0x00}}; !std::equal(std::begin(fixed_header), std::end(fixed_header), std::begin(data))) { DD_LOG(warning) << "EDID data does not contain fixed header."; return std::nullopt; } diff --git a/src/windows/settings_manager_apply.cpp b/src/windows/settings_manager_apply.cpp index d8ef53d..1bddf63 100644 --- a/src/windows/settings_manager_apply.cpp +++ b/src/windows/settings_manager_apply.cpp @@ -299,8 +299,7 @@ namespace display_device { const bool configuring_primary_devices {config.m_device_id.empty()}; const auto original_display_modes {cached_display_modes.empty() ? current_display_modes : cached_display_modes}; - if (const auto new_display_modes {win_utils::computeNewDisplayModes(config.m_resolution, config.m_refresh_rate, configuring_primary_devices, device_to_configure, additional_devices_to_configure, original_display_modes)}; - !try_change(new_display_modes, "Changing display modes to:\n", "Failed to apply new configuration, because new display modes could not be set!")) { + if (const auto new_display_modes {win_utils::computeNewDisplayModes(config.m_resolution, config.m_refresh_rate, configuring_primary_devices, device_to_configure, additional_devices_to_configure, original_display_modes)}; !try_change(new_display_modes, "Changing display modes to:\n", "Failed to apply new configuration, because new display modes could not be set!")) { // Error already logged return false; } @@ -354,8 +353,7 @@ namespace display_device { const bool configuring_primary_devices {config.m_device_id.empty()}; const auto original_hdr_states {cached_hdr_states.empty() ? current_hdr_states : cached_hdr_states}; - if (const auto new_hdr_states {win_utils::computeNewHdrStates(config.m_hdr_state, configuring_primary_devices, device_to_configure, additional_devices_to_configure, original_hdr_states)}; - !try_change(new_hdr_states, "Changing HDR states to:\n", "Failed to apply new configuration, because new HDR states could not be set!")) { + if (const auto new_hdr_states {win_utils::computeNewHdrStates(config.m_hdr_state, configuring_primary_devices, device_to_configure, additional_devices_to_configure, original_hdr_states)}; !try_change(new_hdr_states, "Changing HDR states to:\n", "Failed to apply new configuration, because new HDR states could not be set!")) { // Error already logged return false; } diff --git a/third-party/lizardbyte-common b/third-party/lizardbyte-common index 06cd442..011ad2b 160000 --- a/third-party/lizardbyte-common +++ b/third-party/lizardbyte-common @@ -1 +1 @@ -Subproject commit 06cd442b808f02f1674f3192a84d25b9a503c482 +Subproject commit 011ad2bb139083dcf4ec21f9c09f07470891a668