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.
| Pin | Direction | Purpose |
|---|---|---|
Return Value | Output | TArray<FWNTMonitorInfo> for all active monitors. |
#include "RefreshRateFunctionLibrary.h"
const TArray<FWNTMonitorInfo> Monitors = URefreshRateFunctionLibrary::GetMonitors();FWNTMonitorInfo Fields
| Field | Description |
|---|---|
MonitorId | The unique system identifier for the display. |
Name | The human-readable name of the monitor hardware. |
CurrentResolution | The current active resolution (e.g., 1920x1080). |
CurrentRefreshRate | The current active refresh rate in Hz. |
NativeResolution | The physical native resolution of the display panel. |
bIsPrimary | True if this monitor is designated as the primary Windows display. |
Get Game Window Monitor
Returns the monitor used by the current Unreal game window.
| Pin | Direction | Purpose |
|---|---|---|
Return Value | Output | FWNTMonitorInfo for the game-window monitor. |
#include "RefreshRateFunctionLibrary.h"
const FWNTMonitorInfo MonitorInfo = URefreshRateFunctionLibrary::GetGameWindowMonitor();Get Display Mode
Returns the current display mode for one monitor.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Return Value | Output | FWNTDisplayMode for the selected monitor. |
#include "RefreshRateFunctionLibrary.h"
const FWNTDisplayMode Mode = URefreshRateFunctionLibrary::GetCurrentDisplayMode(MonitorId);FWNTDisplayMode Fields
| Field | Description |
|---|---|
MonitorId | The unique system identifier for the target display. |
Resolution | The dimensions of the tested display mode (e.g., 2560x1440). |
RefreshRate | The refresh rate of the tested display mode in Hz. |
bIsValid | True 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.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Resolution | Input | Target resolution to test. |
RefreshRate | Input | Target refresh rate to test. |
Return Value | Output | True when Windows accepts the display mode. |
#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.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Resolution | Input | Target resolution to apply. |
RefreshRate | Input | Target refresh rate to apply. |
RevertAfterSeconds | Input | Reverts to the previous mode after this delay when greater than zero. |
Return Value | Output | True when the display mode was applied. |
#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.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Return Value | Output | Recommended or native resolution. |
#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.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Resolutions | Output | TArray<FIntPoint> containing unique supported resolutions. |
RefreshRates | Output | TArray<int32> containing unique supported refresh rates in hertz. |
#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.
| Pin | Direction | Purpose |
|---|---|---|
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Return Value | Output | Current refresh rate in hertz. |
#include "RefreshRateFunctionLibrary.h"
const int32 RefreshRate = URefreshRateFunctionLibrary::GetCurrentRefreshRate(MonitorId);Set Refresh Rate
Sets the refresh rate for one monitor while keeping its current resolution.
| Pin | Direction | Purpose |
|---|---|---|
NewRefreshRate | Input | Target refresh rate in hertz. |
MonitorId | Input | Monitor device ID. Leave empty to use the game-window monitor. |
Return Value | Output | True when the refresh-rate change succeeded. |
#include "RefreshRateFunctionLibrary.h"
const bool bChanged = URefreshRateFunctionLibrary::SetRefreshRate(144, MonitorId);Last updated on