Function: resolveSupportedDisplayMode()
resolveSupportedDisplayMode(Resolves a preferred display mode against host-supported modes. An emptypreferred,availableModes?):CharDisplayMode
availableModes array means “no constraint” — the preferred mode
is returned unconditionally. This is intentional: it allows callers to opt
out of mode filtering without a separate code path.
Parameters
preferred
CharDisplayMode
Preferred mode requested by host policy.
availableModes?
readonlyCharDisplayMode[] = DEFAULT_AVAILABLE_DISPLAY_MODES
Supported modes advertised by the host.
Returns
CharDisplayMode
Preferred mode when supported, otherwise the first available mode.
