* Also fill out monitor_info production date from EDID info.
* Do not set serial_number if there is none. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32145 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1a8af60548
commit
86a1f079e9
|
@ -928,9 +928,13 @@ AccelerantHWInterface::GetMonitorInfo(monitor_info* info)
|
||||||
|
|
||||||
memset(info, 0, sizeof(monitor_info));
|
memset(info, 0, sizeof(monitor_info));
|
||||||
strlcpy(info->vendor, edid.vendor.manufacturer, sizeof(info->vendor));
|
strlcpy(info->vendor, edid.vendor.manufacturer, sizeof(info->vendor));
|
||||||
snprintf(info->serial_number, sizeof(info->serial_number), "%lu",
|
if (edid.vendor.serial != 0) {
|
||||||
edid.vendor.serial);
|
snprintf(info->serial_number, sizeof(info->serial_number), "%lu",
|
||||||
|
edid.vendor.serial);
|
||||||
|
}
|
||||||
info->product_id = edid.vendor.prod_id;
|
info->product_id = edid.vendor.prod_id;
|
||||||
|
info->produced.week = edid.vendor.week;
|
||||||
|
info->produced.year = edid.vendor.year;
|
||||||
info->width = edid.display.h_size;
|
info->width = edid.display.h_size;
|
||||||
info->height = edid.display.v_size;
|
info->height = edid.display.v_size;
|
||||||
|
|
||||||
|
@ -946,6 +950,7 @@ AccelerantHWInterface::GetMonitorInfo(monitor_info* info)
|
||||||
case EDID1_MONITOR_NAME:
|
case EDID1_MONITOR_NAME:
|
||||||
// There can be several of these; in this case we'll just
|
// There can be several of these; in this case we'll just
|
||||||
// overwrite the previous entries
|
// overwrite the previous entries
|
||||||
|
// TODO: we could append them as well
|
||||||
strlcpy(info->name, monitor->data.monitor_name,
|
strlcpy(info->name, monitor->data.monitor_name,
|
||||||
sizeof(info->name));
|
sizeof(info->name));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue