src/video/windx5/SDL_dx5events.c
branchSDL-1.2
changeset 4291 6cc2b35ac610
parent 4237 0adda8ff43ef
child 4383 daf9e6037596
equal deleted inserted replaced
4290:485868a1c283 4291:6cc2b35ac610
   653 	/* Check the normal windows queue (highest preference) */
   653 	/* Check the normal windows queue (highest preference) */
   654 	posted = 0;
   654 	posted = 0;
   655 	while ( ! posted &&
   655 	while ( ! posted &&
   656 	        PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) {
   656 	        PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) {
   657 		if ( GetMessage(&msg, NULL, 0, 0) > 0 ) {
   657 		if ( GetMessage(&msg, NULL, 0, 0) > 0 ) {
       
   658 			TranslateMessage(&msg);
   658 			DispatchMessage(&msg);
   659 			DispatchMessage(&msg);
   659 		} else {
   660 		} else {
   660 			return(-1);
   661 			return(-1);
   661 		}
   662 		}
   662 	}
   663 	}
   711 			return(1);
   712 			return(1);
   712 		}
   713 		}
   713 	}
   714 	}
   714 	if ( event != WAIT_TIMEOUT ) {
   715 	if ( event != WAIT_TIMEOUT ) {
   715 		/* Maybe there was a windows message? */
   716 		/* Maybe there was a windows message? */
   716 		if ( PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) {
   717 		posted = 0;
       
   718 		while ( ! posted &&
       
   719 			PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE) ) {
   717 			if ( GetMessage(&msg, NULL, 0, 0) > 0 ) {
   720 			if ( GetMessage(&msg, NULL, 0, 0) > 0 ) {
       
   721 				TranslateMessage(&msg);
   718 				DispatchMessage(&msg);
   722 				DispatchMessage(&msg);
   719 			} else {
   723 			} else {
   720 				return(-1);
   724 				return(-1);
   721 			}
   725 			}
       
   726 		}
       
   727 		if ( posted ) {
   722 			return(1);
   728 			return(1);
   723 		}
   729 		}
   724 	}
   730 	}
   725 	return(0);
   731 	return(0);
   726 }
   732 }