mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
backend/drm: make serial optional
The EDID 1.4 spec says that the serial number is optional: > If this field is not used, then enter “00h, 00h, 00h, 00h”. Leave the wlr_output.serial field NULL in that case, and hide it from the output description.
This commit is contained in:
parent
1b27d537d1
commit
1f96f388e9
2 changed files with 15 additions and 5 deletions
|
|
@ -1343,9 +1343,13 @@ void scan_drm_connectors(struct wlr_drm_backend *drm,
|
|||
|
||||
struct wlr_output *output = &wlr_conn->output;
|
||||
char description[128];
|
||||
snprintf(description, sizeof(description), "%s %s %s (%s%s%s)",
|
||||
output->make, output->model, output->serial, output->name,
|
||||
subconnector ? " via " : "", subconnector ? subconnector : "");
|
||||
snprintf(description, sizeof(description), "%s %s%s%s (%s%s%s)",
|
||||
output->make, output->model,
|
||||
output->serial ? " " : "",
|
||||
output->serial ? output->serial : "",
|
||||
output->name,
|
||||
subconnector ? " via " : "",
|
||||
subconnector ? subconnector : "");
|
||||
wlr_output_set_description(output, description);
|
||||
|
||||
free(subconnector);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue