src/video/windx5/SDL_dx5events.c
branchSDL-1.2
changeset 4291 6cc2b35ac610
parent 4237 0adda8ff43ef
child 4383 daf9e6037596
--- a/src/video/windx5/SDL_dx5events.c	Sat Oct 10 06:38:02 2009 +0000
+++ b/src/video/windx5/SDL_dx5events.c	Sat Oct 10 07:30:00 2009 +0000
@@ -655,6 +655,7 @@
 	while ( ! posted &&
 	        PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) {
 		if ( GetMessage(&msg, NULL, 0, 0) > 0 ) {
+			TranslateMessage(&msg);
 			DispatchMessage(&msg);
 		} else {
 			return(-1);
@@ -713,12 +714,17 @@
 	}
 	if ( event != WAIT_TIMEOUT ) {
 		/* Maybe there was a windows message? */
-		if ( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) {
+		posted = 0;
+		while ( ! posted &&
+			PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) {
 			if ( GetMessage(&msg, NULL, 0, 0) > 0 ) {
+				TranslateMessage(&msg);
 				DispatchMessage(&msg);
 			} else {
 				return(-1);
 			}
+		}
+		if ( posted ) {
 			return(1);
 		}
 	}