diff options
author | Sven Gothel <[email protected]> | 2015-02-16 06:23:43 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-02-16 06:23:43 +0100 |
commit | 70faf070f50ea66fd4cc8f5f586614810f378787 (patch) | |
tree | c4e1175587337386620c823927c017c6fd68c727 /make/build-newt.xml | |
parent | 1eea4278f1be5900f0d990d0a7d352923def217c (diff) |
Bug 1129 - NEWT MonitorDevice's physical size on Windows must be read via EDID
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.
Diffstat (limited to 'make/build-newt.xml')
-rw-r--r-- | make/build-newt.xml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/make/build-newt.xml b/make/build-newt.xml index cf8330eb1..37e6b8bff 100644 --- a/make/build-newt.xml +++ b/make/build-newt.xml @@ -616,6 +616,7 @@ <include name="${rootrel.src.c}/NewtCommon.c" /> <!-- include name="${rootrel.src.c}/timespec.c" /--> <!-- currently used for X11 and OSX with special PERF DEBUG MODE--> <include name="${rootrel.src.c}/WindowsWindow.c" if="isWindows"/> + <include name="${rootrel.src.c}/WindowsEDID.c" if="isWindows"/> <include name="${rootrel.src.c}/MacWindow.m" if="isOSX"/> <include name="${rootrel.src.c}/NewtMacWindow.m" if="isOSX"/> <include name="${rootrel.src.c}/AndroidWindow.c" if="isAndroid"/> |