diff --git a/src/config.cpp b/src/config.cpp index 867524e0..7024736f 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -72,8 +72,8 @@ Config LoadConfig(const std::wstring& path) { "tickHzCap=0\n" "; vsync: 1=present locked to display refresh (smooth, capped); 0=no vsync, paced by tickHzCap (restart to apply)\n" "vsync=1\n" - "; dwmFlush: 1=pace the zoomed loop to DWM's composition (smooth, default); 0=old vsync pacing\n" - "dwmFlush=1\n" + "; dwmFlush: 0=plain vsync pacing (default, fewer stutters); 1=align to DWM's composition\n" + "dwmFlush=0\n" "; diagnostics=1 logs frame timing to %TEMP%\\wind_diag.log (restart to apply)\n" "diagnostics=0\n" "; cursorSensitivity: pan speed per raw count\n" diff --git a/src/config.h b/src/config.h index 87da515f..a5e36740 100644 --- a/src/config.h +++ b/src/config.h @@ -16,11 +16,11 @@ struct Config { // Present sync while zoomed (render engine): 1 = vsync (Present sync-interval 1, locked to // the display refresh); 0 = no vsync (Present 0), with the loop paced by tickHzCap instead. int vsync = 1; - // Pace the zoomed loop with DwmFlush() instead of vsync/timer: present immediately (no vsync - // block) then block until DWM's next composition, so our frames align 1:1 with the - // compositor. Fixes the blt-model microstutter (phase mismatch between our Present and DWM's - // composite) - default ON. 1 = on (overrides vsync while zoomed), 0 = old vsync pacing. - int dwmFlush = 1; + // Zoomed-loop pacing. 0 (default) = plain vsync Present(1,0); measured fewer stutters in + // general (desktop + games), and it doesn't slip toward half-rate under a heavy fullscreen + // game the way DwmFlush can. 1 = present immediately then DwmFlush() to align 1:1 with DWM's + // composition (overrides vsync while zoomed). Hot-reloadable. + int dwmFlush = 0; int diagnostics = 0; // 1 = log frame-timing to wind_diag.log // --- Own GPU renderer --------------------------------------------------- diff --git a/tests/test_config.cpp b/tests/test_config.cpp index 0c177613..fc1be657 100644 --- a/tests/test_config.cpp +++ b/tests/test_config.cpp @@ -30,7 +30,7 @@ TEST_CASE("renderer knobs have sane defaults") { CHECK(c.hdrTonemap == 1); // on by default (no-op on SDR) CHECK(c.cursorVisibility == "auto"); // follow the focused app by default CHECK(c.vsync == 1); // vsync on by default - CHECK(c.dwmFlush == 1); // DwmFlush pacing on by default (the smooth path) + CHECK(c.dwmFlush == 0); // plain vsync pacing by default (fewer stutters) CHECK(c.tickHzCap == 0); // 0 = auto-detect display refresh rate } TEST_CASE("vsync, dwmFlush, tickHzCap can be set") { diff --git a/tools/uiaccess_setup.ps1 b/tools/uiaccess_setup.ps1 index 07e3286d..8ff63e48 100644 --- a/tools/uiaccess_setup.ps1 +++ b/tools/uiaccess_setup.ps1 @@ -77,9 +77,9 @@ brightness=1.0 hdrTonemap=1 tickHzCap=0 vsync=1 -; dwmFlush: 1=pace the zoomed loop to DWM's composition (microstutter test). Hot-reloadable - -; edit this to 0 and save to compare (run notepad as admin, or via the tray "Edit config"). -dwmFlush=1 +; dwmFlush: 0=plain vsync pacing (default, fewer stutters); 1=align to DWM's composition. +; Hot-reloadable - edit and save to compare (notepad as admin, or the tray "Edit config"). +dwmFlush=0 "@ Set-Content -Path "C:\Program Files\Wind\magnifier.ini" -Value $ini -Encoding ASCII