class

DisplaySettings

Player-facing display settings: a static facade over Config for persistence, SDL for enumeration, and Window + Renderer for applying a change at runtime.

Module
MowoEngine
Header
#include "Core/DisplaySettings.h"
Namespace
Mowo

Public functions

ReturnsNameDescription
FDisplayConfigGetPersisted to Display.ini under AppData / the project's Saved dir.
voidSave
std::vector<FMonitorInfo>EnumerateMonitorsNeeds an initialized SDL video subsystem.
std::vector<FDisplayMode>EnumerateModes
floatGetWindowRefreshRateRefresh rate of the monitor the window is on now, 0 when unknown.
voidApplyPushes the config onto a live window (mode / monitor / resolution / refresh) and, when applyVSync is true, drives Renderer::SetVSync with a deferred swapchain recreate.
voidApplyPersistedReads the persisted config and applies it.
voidSetVSyncRuntimeDrives Renderer::SetVSync immediately and persists the new value.
EWindowModeParseMode
const char*ModeToString

Function details

Get

C++
static FDisplayConfig Get()

Persisted to Display.ini under AppData / the project's Saved dir.

Save

C++
static void Save(const FDisplayConfig& cfg)

EnumerateMonitors

C++
static std::vector<FMonitorInfo> EnumerateMonitors()

Needs an initialized SDL video subsystem.

EnumerateModes

C++
static std::vector<FDisplayMode> EnumerateModes(int32_t monitorIndex)

GetWindowRefreshRate

C++
static float GetWindowRefreshRate(Window& window)

Refresh rate of the monitor the window is on now, 0 when unknown. Cheap enough to poll once per frame (SDL caches the current mode).

Apply

C++
static void Apply(Window& window, const FDisplayConfig& cfg, bool applyVSync = true)

Pushes the config onto a live window (mode / monitor / resolution / refresh) and, when applyVSync is true, drives Renderer::SetVSync with a deferred swapchain recreate. Persists nothing — call Save() for that.

ApplyPersisted

C++
static void ApplyPersisted(Window& window)

Reads the persisted config and applies it. No-op for window/monitor/ resolution when the user has never set anything (hasBeenSet == false), so launch defaults survive; vsync always follows the config.

SetVSyncRuntime

C++
static void SetVSyncRuntime(bool enabled)

Drives Renderer::SetVSync immediately and persists the new value. Safe to call every frame — SetVSync early-outs when unchanged.

ParseMode

C++
static EWindowMode ParseMode(const std::string& s)

ModeToString

C++
static const char* ModeToString(EWindowMode m)
Generated from Core/DisplaySettings.h via mowoengine.json · Oct 27, 2026Version 1.0.0