| 580 | } |
| 581 | |
| 582 | void I_GetEvent () |
| 583 | { |
| 584 | MSG mess; |
| 585 | |
| 586 | // Briefly enter an alertable state so that if a secondary thread |
| 587 | // crashed, we will execute the APC it sent now. |
| 588 | SleepEx (0, TRUE); |
| 589 | |
| 590 | while (PeekMessage (&mess, NULL, 0, 0, PM_REMOVE)) |
| 591 | { |
| 592 | if (mess.message == WM_QUIT) |
| 593 | throw CExitEvent(mess.wParam); |
| 594 | |
| 595 | if (GUICapture) |
| 596 | { |
| 597 | TranslateMessage (&mess); |
| 598 | } |
| 599 | DispatchMessage (&mess); |
| 600 | } |
| 601 | |
| 602 | if (Keyboard != NULL) |
| 603 | { |
| 604 | Keyboard->ProcessInput(); |
| 605 | } |
| 606 | if (Mouse != NULL) |
| 607 | { |
| 608 | Mouse->ProcessInput(); |
| 609 | } |
| 610 | } |
| 611 | |
| 612 | // |
| 613 | // I_StartTic |
no test coverage detected