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