mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
Ensure WMI monitors support brightness control
Added a condition in `PowerDisplayViewModel` to ensure that monitors using the "WMI" communication method are always marked as supporting brightness control. This is achieved by explicitly setting `monitor.SupportsBrightness` to `true` for WMI monitors, as brightness is controlled through the Windows WMI interface. Updated comments to clarify this behavior, improving compatibility and accuracy for WMI-based monitors.
This commit is contained in:
@@ -312,6 +312,13 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
monitor.SupportsColorTemperature = result.SupportsColorTemperature;
|
||||
monitor.SupportsVolume = result.SupportsVolume;
|
||||
monitor.SupportsInputSource = result.SupportsInputSource;
|
||||
|
||||
// WMI monitors always support brightness control, even without DDC/CI capabilities
|
||||
// They control brightness through the Windows WMI interface
|
||||
if (string.Equals(monitor.CommunicationMethod, "WMI", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
monitor.SupportsBrightness = true;
|
||||
}
|
||||
}
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "CA1816:Dispose methods should call SuppressFinalize", Justification = "Base class PageViewModelBase.Dispose() handles GC.SuppressFinalize")]
|
||||
|
||||
Reference in New Issue
Block a user