Fix sticky keys due to loading screens

Fix infinite loop/hang after an assertion failure

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1113 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Overhaul
2007-07-25 04:44:58 +00:00
parent b559e8601d
commit b24712f2b6
2 changed files with 26 additions and 2 deletions
+8 -2
View File
@@ -1613,9 +1613,15 @@ void DequeueAllKeyBoardEvents()
//dequeue all the events waiting in the windows queue
while( PeekMessage( &KeyMessage, ghWindow, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE ) );
//Give them proper processing like the old window hook method used to.
while( PeekMessage( &KeyMessage, ghWindow, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE ) )
{
TranslateMessage( &KeyMessage);
DispatchMessage( &KeyMessage);
}
//Deque all the events waiting in the SGP queue
//Now deque all the events waiting in the SGP queue
//Including those that were just posted in the code above
while (DequeueEvent(&InputEvent) == TRUE)
{
//dont do anything