Drop frames when the LGMP queue is full instead of blocking
while holding an IddCx surface. Always finish every
acquired frame, including duplicate frame numbers, so
replug teardown cannot trigger the release-frame watchdog.
Generate the EDID once during adapter initialization and update only the
live mode list when resolutions change.
Changing the EDID during a monitor replug causes Windows to identify it
as a different monitor, losing the existing display configuration.
Reusing the original EDID preserves the monitor identity while still
allowing dynamic modes to be advertised through IddCx.
Submit the D3D12 copy before exposing the frame through LGMP, preventing
clients from waiting on work that has not yet been queued. Track the
last published buffer separately for safe subscriber resends and handle
submission failures.
While it would make much more sense to use these then a full replug to
change modes, Microsoft have not properly implemented the API to clear
the cached monitor mode states internally, making these calls useless.
Revert to just replugging the device on mode change
Also refactored the versioning code to be more modular.
The old registry code was turned into a fallback and simplified, since
C++11 and newer guarantees the byte past the end of the std::string is
valid for null-terminator writes.
Following the example of CPipeClient in the helper, this switches to using
overlapped I/O for easy interruption and cancellation that doesn't quite
work with CancelSynchronousIO.
No GPU notifications are not possible before the notification icon is
created. Since the helper could start before explorer.exe (and often does
on reboot), the notification would fail.
This commit adds logic to refer the notification and we send it immediately
when successfully creating the notification icon.
After 882d531792, the existing code in the
helper reads past the end of the array for refresh rate, which is broken.
This PR also refactors the default modes into a getDefaultModes method so
that it can be used for a reset feature later.