Skip to content

v0.2.1

Pre-release
Pre-release

Choose a tag to compare

@osy osy released this 02 Aug 08:39
· 1 commit to neptune since this release
viogpuap: skip SetDisplayConfig when the resolution is unchanged

The resolution event fires for every host display event, not only for
actual mode changes, and SetDisplayConfig with SDC_APPLY forces a
modeset -- a visible blank plus a DWM swapchain rebuild -- even when
the supplied mode equals the current one. Every no-op monitors config
from the client therefore blanked the guest display, and guest-initiated
resolution changes were fought by the reapply.

Compare GetCustomResolution against GetCurrentResolution and skip the
apply (with a log line) when they already match.

That comparison also makes SetResolution the branch taken when the
display config could not be read at all, so bounds-check what it
indexes: m_Index against the path array, and the path's modeInfoIdx
against the mode info array. An inactive path carries
DISPLAYCONFIG_PATH_MODE_IDX_INVALID and a failed QueryDisplayConfig
leaves the arrays NULL, either of which would have been written out of
bounds.

Assisted-by: Claude:claude-fable-5
Assisted-by: Claude:claude-opus-5[1m]