Skip to content

Commit

Permalink
Remove code to PeekMessage()
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Sep 13, 2024
1 parent 4fd3f8a commit 5916612
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion Dllmain/BuildNo.rc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 7152
#define BUILD_NUMBER 7153
8 changes: 0 additions & 8 deletions ddraw/IDirectDrawX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 5916612

Please sign in to comment.