mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user