MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / ProcessConsoleInput

Function ProcessConsoleInput

src/Window_Terminal.c:374–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374static void ProcessConsoleInput(void) {
375 char buf[256];
376
377 int n = read(STDIN_FILENO, buf, sizeof(buf));
378 int A = buf[0];
379 //Platform_Log2("IN: %i, %i", &n, &A);
380
381 if (n >= 4 && buf[0] == '\x1b' && buf[1] == '[' && buf[2] == '<') {
382 ProcessMouse(buf, n);
383 } else if (buf[0] >= 32 && buf[0] < 127) {
384 ProcessKey(buf[0]);
385 }
386}
387
388static void ProcessConsoleEvents(float delta) {
389 if (stdin_available()) ProcessConsoleInput();

Callers 1

ProcessConsoleEventsFunction · 0.85

Calls 2

ProcessKeyFunction · 0.85
ProcessMouseFunction · 0.70

Tested by

no test coverage detected