Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DrmOutputOptions.ConnectorTypeId naming #15710

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading