summaryrefslogtreecommitdiffstats
path: root/src/newt/native/WindowsEDID.c
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1196: Fix Unresolved strncpy_s (MSVCRT) on WinXPSven Gothel2015-08-201-2/+8
| | | | | | | | | | Unresolved strncpy_s (MSVCRT) on WinXP, as shown w/ dependency walker (red module, red unresolved line). Mapped: _tcsncpy_s -> strncpy_s (!UNICODE). On WinXP MSVCRT has no strncpy_s. _tcsncpy_s(sOut, sOutLen, s, len) -> bound-check + _tcsncpy(sOut, s, len)
* Bug 1129 - NEWT MonitorDevice's physical size on Windows must be read via EDIDSven Gothel2015-02-161-0/+419
On Windows, one must read the monitor's EDID data as stored in the registry, no 'simple' API works otherwise. The proper way requires utilizing the Windows Setup-API. This code is inspired by Ofek Shilon's code and blog post: <http://ofekshilon.com/2014/06/19/reading-specific-monitor-dimensions/> See: function 'NewtEDID_GetMonitorSizeFromEDIDByModelName' In contrast to Ofek's code, function 'NewtEDID_GetMonitorSizeFromEDIDByDevice' uses the proper link from DISPLAY_DEVICE.DeviceID -> SP_DEVICE_INTERFACE_DETAIL_DATA.DevicePath, where DISPLAY_DEVICE.DeviceID is the monitor's enumeration via: EnumDisplayDevices(adapterName, monitor_idx, &ddMon, EDD_GET_DEVICE_INTERFACE_NAME); Hence the path to the registry-entry is well determined instead of just comparing the monitor's model name.