MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / InputWaiting

Function InputWaiting

src/video/dedicated_v.cpp:149–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147
148#if defined(UNIX)
149static bool InputWaiting()
150{
151 struct timeval tv;
152 fd_set readfds;
153
154 tv.tv_sec = 0;
155 tv.tv_usec = 1;
156
157 FD_ZERO(&readfds);
158 FD_SET(STDIN, &readfds);
159
160 /* don't care about writefds and exceptfds: */
161 return select(STDIN + 1, &readfds, nullptr, nullptr, &tv) > 0;
162}
163
164#else
165

Callers 1

DedicatedHandleKeyInputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected