Browse Source

Fix DrmOutputOptions.ConnectorTypeId naming (#15710)

pull/15641/head
Julien Lebosquain 2 years ago
committed by GitHub
parent
commit
a60c59083d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 16
      src/Linux/Avalonia.LinuxFramebuffer/DrmOutputOptions.cs
  2. 4
      src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs
  3. 4
      src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs

16
src/Linux/Avalonia.LinuxFramebuffer/DrmOutputOptions.cs

@ -26,21 +26,21 @@ namespace Avalonia.LinuxFramebuffer
public Color InitialBufferSwappingColor { get; set; } = new Color(0, 0, 0, 0); public Color InitialBufferSwappingColor { get; set; } = new Color(0, 0, 0, 0);
/// <summary> /// <summary>
/// specific the video mode with which the DrmOutput should be created, if it is not found it will fallback to the preferred mode. /// 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 preferred mode will be used. /// If null, the preferred mode will be used.
/// </summary> /// </summary>
public PixelSize? VideoMode { get; set; } public PixelSize? VideoMode { get; set; }
/// <summary> /// <summary>
/// Specific whether our connector is HDMI-A, DVI, DisplayPort, etc. /// Specifies whether our connector is HDMI-A, DVI, DisplayPort, etc.
/// If NULL preferred connector will be used. /// If null, the preferred connector will be used.
/// </summary> /// </summary>
public DrmConnectorType? ConnectorType { get; init; } public DrmConnectorType? ConnectorType { get; set; }
/// <summary> /// <summary>
/// Specific whether connector id using for <see cref="ConnectorType"/> /// Specifies the connector type ID used with <see cref="ConnectorType"/>.
/// If NULL preferred connector id will be used /// If null, the preferred connector type ID will be used.
/// </summary> /// </summary>
public uint? ConnectorType_Id { get; init; } public uint? ConnectorTypeId { get; set; }
} }
} }

4
src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs

@ -28,7 +28,7 @@ namespace Avalonia.LinuxFramebuffer.Output
internal List<uint> EncoderIds { get; } = new List<uint>(); internal List<uint> EncoderIds { get; } = new List<uint>();
public List<DrmModeInfo> Modes { get; } = new List<DrmModeInfo>(); public List<DrmModeInfo> Modes { get; } = new List<DrmModeInfo>();
public DrmConnectorType ConnectorType { get; } public DrmConnectorType ConnectorType { get; }
public uint ConnectorType_Id { get; } public uint ConnectorTypeId { get; }
internal DrmConnector(drmModeConnector* conn) internal DrmConnector(drmModeConnector* conn)
{ {
Connection = conn->connection; Connection = conn->connection;
@ -41,7 +41,7 @@ namespace Avalonia.LinuxFramebuffer.Output
for (var c = 0; c < conn->count_modes; c++) for (var c = 0; c < conn->count_modes; c++)
Modes.Add(new DrmModeInfo(ref conn->modes[c])); Modes.Add(new DrmModeInfo(ref conn->modes[c]));
ConnectorType = (DrmConnectorType)conn->connector_type; ConnectorType = (DrmConnectorType)conn->connector_type;
ConnectorType_Id = conn->connector_type_id; ConnectorTypeId = conn->connector_type_id;
if (conn->connector_type > KnownConnectorTypes.Length - 1) if (conn->connector_type > KnownConnectorTypes.Length - 1)
Name = $"Unknown({conn->connector_type})-{conn->connector_type_id}"; Name = $"Unknown({conn->connector_type})-{conn->connector_type_id}";
else else

4
src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs

@ -67,9 +67,9 @@ namespace Avalonia.LinuxFramebuffer.Output
connectors = connectors.Where(c => c.ConnectorType == connectorType); 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 = var connector =

Loading…
Cancel
Save