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

Function mswin_input_peek

outdated/sys/wince/mhinput.c:94–118  ·  view source on GitHub ↗

get event from the queue but leave it there */

Source from the content-addressed store, hash-verified

92
93/* get event from the queue but leave it there */
94PMSNHEvent
95mswin_input_peek()
96{
97 PMSNHEvent retval;
98
99#ifdef SAFERHANGUP
100 /* always return ESC when hangup was requested */
101 if (program_state.done_hup) {
102 static MSNHEvent hangup_event;
103 hangup_event.type = NHEVENT_CHAR;
104 hangup_event.kbd.ch = '\033';
105 return &hangup_event;
106 }
107#endif
108
109 if (!nhi_init_input)
110 mswin_nh_input_init();
111
112 if (nhi_read_pos != nhi_write_pos) {
113 retval = &nhi_input_buffer[nhi_read_pos];
114 } else {
115 retval = NULL;
116 }
117 return retval;
118}

Callers

nothing calls this directly

Calls 1

mswin_nh_input_initFunction · 0.70

Tested by

no test coverage detected