Skip to content

Commit

Permalink
Fix DrmOutputOptions.ConnectorTypeId naming (#15710)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrJul authored and grokys committed Jun 3, 2024
1 parent cbc1946 commit c7f6e3e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions src/Linux/Avalonia.LinuxFramebuffer/DrmOutputOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ public class DrmOutputOptions
public Color InitialBufferSwappingColor { get; set; } = new Color(0, 0, 0, 0);

/// <summary>
/// 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.
/// </summary>
public PixelSize? VideoMode { get; set; }

/// <summary>
/// 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.
/// </summary>
public DrmConnectorType? ConnectorType { get; init; }
public DrmConnectorType? ConnectorType { get; set; }

/// <summary>
/// Specific whether connector id using for <see cref="ConnectorType"/>
/// If NULL preferred connector id will be used
/// Specifies the connector type ID used with <see cref="ConnectorType"/>.
/// If null, the preferred connector type ID will be used.
/// </summary>
public uint? ConnectorType_Id { get; init; }
public uint? ConnectorTypeId { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/Linux/Avalonia.LinuxFramebuffer/Output/DrmBindings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public unsafe class DrmConnector
internal List<uint> EncoderIds { get; } = new List<uint>();
public List<DrmModeInfo> Modes { get; } = new List<DrmModeInfo>();
public DrmConnectorType ConnectorType { get; }
public uint ConnectorType_Id { get; }
public uint ConnectorTypeId { get; }
internal DrmConnector(drmModeConnector* conn)
{
Connection = conn->connection;
Expand All @@ -41,7 +41,7 @@ internal DrmConnector(drmModeConnector* conn)
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
Expand Down
4 changes: 2 additions & 2 deletions src/Linux/Avalonia.LinuxFramebuffer/Output/DrmOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public DrmOutput(DrmCard card, bool connectorsForceProbe = false, DrmOutputOptio
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 =
Expand Down

0 comments on commit c7f6e3e

Please sign in to comment.