Windows Native Toolkit

Display Mode Library

Monitor discovery, display-mode query, refresh-rate, and display-mode application nodes.

Use this library for monitor-aware settings screens and Windows display-mode control.

Monitor Selection

Leave MonitorId empty to target the monitor currently used by the Unreal game window.

Failure Reporting

Public error-message pins were removed. When a setter or test node fails, it returns false and writes the reason to the Unreal log.

Get Monitors

Returns every active Windows monitor.

PinDirectionPurpose
Return ValueOutputTArray<FWNTMonitorInfo> for all active monitors.
C++ Example
  #include "RefreshRateFunctionLibrary.h"

  const TArray<FWNTMonitorInfo> Monitors = URefreshRateFunctionLibrary::GetMonitors();

FWNTMonitorInfo Fields

FieldDescription
MonitorIdThe unique system identifier for the display.
NameThe human-readable name of the monitor hardware.
CurrentResolutionThe current active resolution (e.g., 1920x1080).
CurrentRefreshRateThe current active refresh rate in Hz.
NativeResolutionThe physical native resolution of the display panel.
bIsPrimaryTrue if this monitor is designated as the primary Windows display.

Get Game Window Monitor

Returns the monitor used by the current Unreal game window.

PinDirectionPurpose
Return ValueOutputFWNTMonitorInfo for the game-window monitor.
C++ Example
  #include "RefreshRateFunctionLibrary.h"

  const FWNTMonitorInfo MonitorInfo = URefreshRateFunctionLibrary::GetGameWindowMonitor();

Get Display Mode

Returns the current display mode for one monitor.

PinDirectionPurpose
MonitorIdInputMonitor device ID. Leave empty to use the game-window monitor.
Return ValueOutputFWNTDisplayMode for the selected monitor.
C++ Example
  #include "RefreshRateFunctionLibrary.h"

  const FWNTDisplayMode Mode = URefreshRateFunctionLibrary::GetCurrentDisplayMode(MonitorId);

FWNTDisplayMode Fields

FieldDescription
MonitorIdThe unique system identifier for the target display.
ResolutionThe dimensions of the tested display mode (e.g., 2560x1440).
RefreshRateThe refresh rate of the tested display mode in Hz.
bIsValidTrue if the monitor successfully supports this resolution and refresh rate combination.

Test Display Mode

Tests whether Windows accepts a resolution and refresh rate without applying the mode.

PinDirectionPurpose
MonitorIdInputMonitor device ID. Leave empty to use the game-window monitor.
ResolutionInputTarget resolution to test.
RefreshRateInputTarget refresh rate to test.
Return ValueOutputTrue when Windows accepts the display mode.
C++ Example
  #include "RefreshRateFunctionLibrary.h"

  const bool bSupported =
      URefreshRateFunctionLibrary::TestDisplayMode(MonitorId, FIntPoint(2560, 1440), 144);

Apply Display Mode

Applies a resolution and refresh rate to a monitor.

PinDirectionPurpose
MonitorIdInputMonitor device ID. Leave empty to use the game-window monitor.
ResolutionInputTarget resolution to apply.
RefreshRateInputTarget refresh rate to apply.
RevertAfterSecondsInputReverts to the previous mode after this delay when greater than zero.
Return ValueOutputTrue when the display mode was applied.
C++ Example
  #include "RefreshRateFunctionLibrary.h"

  const bool bApplied =
      URefreshRateFunctionLibrary::ApplyDisplayMode(MonitorId, FIntPoint(1920, 1080), 120, 10.0f);

Get Native Resolution

Returns the Windows recommended resolution for a monitor.

PinDirectionPurpose
MonitorIdInputMonitor device ID. Leave empty to use the game-window monitor.
Return ValueOutputRecommended or native resolution.
C++ Example
  #include "RefreshRateFunctionLibrary.h"

  const FIntPoint NativeResolution = URefreshRateFunctionLibrary::GetNativeResolution(MonitorId);

Get Supported Display Modes

Returns the unique resolutions and unique refresh rates that Windows exposes in display settings for the selected monitor.

PinDirectionPurpose
MonitorIdInputMonitor device ID. Leave empty to use the game-window monitor.
ResolutionsOutputTArray<FIntPoint> containing unique supported resolutions.
RefreshRatesOutputTArray<int32> containing unique supported refresh rates in hertz.
C++ Example
  #include "RefreshRateFunctionLibrary.h"

  TArray<FIntPoint> Resolutions;
  TArray<int32> RefreshRates;
  URefreshRateFunctionLibrary::GetSupportedDisplayModes(MonitorId, Resolutions, RefreshRates);

Get Refresh Rate

Returns the current refresh rate for one monitor.

PinDirectionPurpose
MonitorIdInputMonitor device ID. Leave empty to use the game-window monitor.
Return ValueOutputCurrent refresh rate in hertz.
C++ Example
  #include "RefreshRateFunctionLibrary.h"

  const int32 RefreshRate = URefreshRateFunctionLibrary::GetCurrentRefreshRate(MonitorId);

Set Refresh Rate

Sets the refresh rate for one monitor while keeping its current resolution.

PinDirectionPurpose
NewRefreshRateInputTarget refresh rate in hertz.
MonitorIdInputMonitor device ID. Leave empty to use the game-window monitor.
Return ValueOutputTrue when the refresh-rate change succeeded.
C++ Example
  #include "RefreshRateFunctionLibrary.h"

  const bool bChanged = URefreshRateFunctionLibrary::SetRefreshRate(144, MonitorId);

Last updated on

On this page