mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
Add wlr_output.serial
This commit is contained in:
parent
2bee288090
commit
09279b90a6
3 changed files with 12 additions and 3 deletions
|
|
@ -106,8 +106,15 @@ void parse_edid(struct wlr_output *restrict output, size_t len, const uint8_t *d
|
|||
if (nl) {
|
||||
*nl = '\0';
|
||||
}
|
||||
} else if (flag == 0 && data[i + 3] == 0xFF) {
|
||||
sprintf(output->serial, "%.13s", &data[i + 5]);
|
||||
|
||||
break;
|
||||
// Monitor serial numbers are terminated by newline if they're too
|
||||
// short
|
||||
char *nl = strchr(output->serial, '\n');
|
||||
if (nl) {
|
||||
*nl = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue