From a23f97483f5a654eadc6b8e66fdf65038fc2d0d8 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 28 Mar 2025 20:31:07 -0700
Subject: [PATCH] Temporarily disable DwmFlush()
For some reason this locks up the Windows compositor when called by Steam. I'm disabling it for now until we understand why and whether this can cause issues for other applications as well.
---
src/video/windows/SDL_windowsevents.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c
index 2b069f6c23c4c..7c0c5590e1a59 100644
--- a/src/video/windows/SDL_windowsevents.c
+++ b/src/video/windows/SDL_windowsevents.c
@@ -1865,10 +1865,12 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
SDL_OnWindowLiveResizeUpdate(data->window);
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
+#if 0 // This locks up the Windows compositor when called by Steam; disabling until we understand why
// Make sure graphics operations are complete for smooth refresh
if (data->videodata->DwmFlush) {
data->videodata->DwmFlush();
}
+#endif
#endif
return 0;
}