* 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:
Axel Dörfler 2009-08-05 19:10:22 +00:00
parent 1a8af60548
commit 86a1f079e9
1 changed files with 7 additions and 2 deletions

View File

@ -928,9 +928,13 @@ AccelerantHWInterface::GetMonitorInfo(monitor_info* info)
memset(info, 0, sizeof(monitor_info));
strlcpy(info->vendor, edid.vendor.manufacturer, sizeof(info->vendor));
if (edid.vendor.serial != 0) {
snprintf(info->serial_number, sizeof(info->serial_number), "%lu",
edid.vendor.serial);
}
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->height = edid.display.v_size;
@ -946,6 +950,7 @@ AccelerantHWInterface::GetMonitorInfo(monitor_info* info)
case EDID1_MONITOR_NAME:
// There can be several of these; in this case we'll just
// overwrite the previous entries
// TODO: we could append them as well
strlcpy(info->name, monitor->data.monitor_name,
sizeof(info->name));
break;