mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-17 14:13:06 +00:00
fix: force VSync on main menu to prevent GPU coil whine
This commit is contained in:
parent
af39797303
commit
fde5fbe6f4
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Reference in a new issue