* Wait for input, and return the read event. * @return New input. */
| 552 | * @return New input. |
| 553 | */ |
| 554 | uint16 Input_Wait(void) |
| 555 | { |
| 556 | uint16 value = 0; |
| 557 | |
| 558 | for (;; sleepIdle()) { |
| 559 | if (g_mouseMode == INPUT_MOUSE_MODE_PLAY) break; |
| 560 | |
| 561 | value = s_historyHead; |
| 562 | if (value != s_historyTail) break; |
| 563 | } |
| 564 | |
| 565 | value = Input_ReadHistory(value); |
| 566 | |
| 567 | Input_ReadInputFromFile(); |
| 568 | return value; |
| 569 | } |
| 570 | |
| 571 | /** |
| 572 | * Test whether \a value is available in the input. |
no test coverage detected