From 5916612a7f52a1cdc3642837c5aad0b50cce640f Mon Sep 17 00:00:00 2001 From: Elisha Riedlinger Date: Fri, 13 Sep 2024 15:44:43 -0700 Subject: [PATCH] Remove code to PeekMessage() --- Dllmain/BuildNo.rc | 2 +- ddraw/IDirectDrawX.cpp | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/Dllmain/BuildNo.rc b/Dllmain/BuildNo.rc index d64d033d..2cec405d 100644 --- a/Dllmain/BuildNo.rc +++ b/Dllmain/BuildNo.rc @@ -1 +1 @@ -#define BUILD_NUMBER 7152 +#define BUILD_NUMBER 7153 diff --git a/ddraw/IDirectDrawX.cpp b/ddraw/IDirectDrawX.cpp index a2da2bbb..6b357465 100644 --- a/ddraw/IDirectDrawX.cpp +++ b/ddraw/IDirectDrawX.cpp @@ -1712,14 +1712,6 @@ HRESULT m_IDirectDrawX::SetCooperativeLevel(HWND hWnd, DWORD dwFlags, DWORD Dire // The flag (DDSCL_NOWINDOWCHANGES) means DirectDraw is not allowed to minimize or restore the application window on activation. Device.NoWindowChanges = ((dwFlags & DDSCL_NOWINDOWCHANGES) != 0); - // Make sure all windows messages are handled - MSG msg; - if (PeekMessageA(&msg, DisplayMode.hWnd, 0, 0, PM_REMOVE)) - { - TranslateMessage(&msg); - DispatchMessageA(&msg); - } - // Reset if mode was changed if ((dwFlags & (DDSCL_NORMAL | DDSCL_EXCLUSIVE)) && (d3d9Device || LastUsedHWnd == DisplayMode.hWnd) && (LastExclusiveMode != ExclusiveMode || LasthWnd != DisplayMode.hWnd || LastFPUPreserve != Device.FPUPreserve))