From a60c59083d2e451f076afee020b2aefdb93d4d90 Mon Sep 17 00:00:00 2001 From: Julien Lebosquain Date: Tue, 14 May 2024 12:02:56 +0200 Subject: [PATCH] Fix DrmOutputOptions.ConnectorTypeId naming (#15710) --- .../DrmOutputOptions.cs | 16 ++++++++-------- .../Output/DrmBindings.cs | 4 ++-- .../Output/DrmOutput.cs | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Linux/Avalonia.LinuxFramebuffer/DrmOutputOptions.cs b/src/Linux/Avalonia.LinuxFramebuffer/DrmOutputOptions.cs index 6ebb8f9656..f733fe4d72 100644 --- a/src/Linux/Avalonia.LinuxFramebuffer/DrmOutputOptions.cs +++ b/src/Linux/Avalonia.LinuxFramebuffer/DrmOutputOptions.cs @@ -26,21 +26,21 @@ namespace Avalonia.LinuxFramebuffer public Color InitialBufferSwappingColor { get; set; } = new Color(0, 0, 0, 0); /// - /// specific the video mode with which the DrmOutput should be created, if it is not found it will fallback to the preferred mode. - /// If NULL preferred mode will be used. + /// Specifies the video mode with which the DrmOutput should be created, if it is not found it will fallback to the preferred mode. + /// If null, the preferred mode will be used. /// public PixelSize? VideoMode { get; set; } /// - /// Specific whether our connector is HDMI-A, DVI, DisplayPort, etc. - /// If NULL preferred connector will be used. + /// Specifies whether our connector is HDMI-A, DVI, DisplayPort, etc. + /// If null, the preferred connector will be used. /// - public DrmConnectorType? ConnectorType { get; init; } + public DrmConnectorType? ConnectorType { get; set; } /// - /// Specific whether connector id using for - /// If NULL preferred connector id will be used + /// Specifies the connector type ID used with . + /// If null, the preferred connector type ID will be used. /// - public uint? ConnectorType_Id { get; init; } + public uint? ConnectorTypeId { get; set; } } } diff --git a/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs b/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs index 3468599381..e86673155f 100644 --- a/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs +++ b/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs @@ -28,7 +28,7 @@ namespace Avalonia.LinuxFramebuffer.Output internal List EncoderIds { get; } = new List(); public List Modes { get; } = new List(); public DrmConnectorType ConnectorType { get; } - public uint ConnectorType_Id { get; } + public uint ConnectorTypeId { get; } internal DrmConnector(drmModeConnector* conn) { Connection = conn->connection; @@ -41,7 +41,7 @@ namespace Avalonia.LinuxFramebuffer.Output for (var c = 0; c < conn->count_modes; c++) Modes.Add(new DrmModeInfo(ref conn->modes[c])); ConnectorType = (DrmConnectorType)conn->connector_type; - ConnectorType_Id = conn->connector_type_id; + ConnectorTypeId = conn->connector_type_id; if (conn->connector_type > KnownConnectorTypes.Length - 1) Name = $"Unknown({conn->connector_type})-{conn->connector_type_id}"; else diff --git a/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs b/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs index 91441c64a0..72036fcabc 100644 --- a/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs +++ b/src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs @@ -67,9 +67,9 @@ namespace Avalonia.LinuxFramebuffer.Output connectors = connectors.Where(c => c.ConnectorType == connectorType); } - if (options?.ConnectorType_Id is { } connectorType_Id) + if (options?.ConnectorTypeId is { } connectorTypeId) { - connectors = connectors.Where(c => c.ConnectorType_Id == connectorType_Id); + connectors = connectors.Where(c => c.ConnectorTypeId == connectorTypeId); } var connector =