Skip to main content

Function: resolveSupportedDisplayMode()

resolveSupportedDisplayMode(preferred, availableModes?): CharDisplayMode
Resolves a preferred display mode against host-supported modes. An empty 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?

readonly CharDisplayMode[] = DEFAULT_AVAILABLE_DISPLAY_MODES Supported modes advertised by the host.

Returns

CharDisplayMode Preferred mode when supported, otherwise the first available mode.