mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/LCE-Revelations.git
synced 2026-06-17 21:32:02 +00:00
fix: force VSync on main menu to prevent GPU coil whine
This commit is contained in:
@@ -1966,7 +1966,11 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
// Present the frame. RenderManager.Present() hardcodes SyncInterval=1,
|
||||
// so when VSync is off we bypass it for uncapped frames. In DXGI
|
||||
// exclusive fullscreen this produces real tearing via direct scanout.
|
||||
if (!g_bVSync && g_pSwapChain)
|
||||
// Force VSync on the main menu regardless of user setting: an uncapped
|
||||
// simple menu scene drives the GPU to thousands of FPS and causes coil
|
||||
// whine on many cards.
|
||||
const bool forceVSyncForMenu = !app.GetGameStarted();
|
||||
if (!g_bVSync && !forceVSyncForMenu && g_pSwapChain)
|
||||
{
|
||||
HRESULT hrPresent = g_pSwapChain->Present(0, 0);
|
||||
// If the direct Present fails (e.g. during fullscreen transition),
|
||||
|
||||
Reference in New Issue
Block a user