MCPcopy Create free account
hub / github.com/NetHack/NetHack / mswin_input_pop

Function mswin_input_pop

outdated/sys/wince/mhinput.c:65–91  ·  view source on GitHub ↗

get event from the queue and delete it */

Source from the content-addressed store, hash-verified

63
64/* get event from the queue and delete it */
65PMSNHEvent
66mswin_input_pop()
67{
68 PMSNHEvent retval;
69
70#ifdef SAFERHANGUP
71 /* always return ESC when hangup was requested */
72 if (program_state.done_hup) {
73 static MSNHEvent hangup_event;
74 hangup_event.type = NHEVENT_CHAR;
75 hangup_event.kbd.ch = '\033';
76 return &hangup_event;
77 }
78#endif
79
80 if (!nhi_init_input)
81 mswin_nh_input_init();
82
83 if (nhi_read_pos != nhi_write_pos) {
84 retval = &nhi_input_buffer[nhi_read_pos];
85 nhi_read_pos = (nhi_read_pos + 1) % NH_INPUT_BUFFER_SIZE;
86 } else {
87 retval = NULL;
88 }
89
90 return retval;
91}
92
93/* get event from the queue but leave it there */
94PMSNHEvent

Callers 3

mswin_nhgetchFunction · 0.70
mswin_nh_poskeyFunction · 0.70
NHMenuListWndProcFunction · 0.70

Calls 1

mswin_nh_input_initFunction · 0.70

Tested by

no test coverage detected