MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / Input_Wait

Function Input_Wait

src/input/input.c:554–569  ·  view source on GitHub ↗

* Wait for input, and return the read event. * @return New input. */

Source from the content-addressed store, hash-verified

552 * @return New input.
553 */
554uint16 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.

Callers 2

GameLoop_HandleEventsFunction · 0.85
GUI_Widget_HandleEventsFunction · 0.85

Calls 2

Input_ReadHistoryFunction · 0.85
Input_ReadInputFromFileFunction · 0.85

Tested by

no test coverage detected