| 372 | } |
| 373 | |
| 374 | static 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 | |
| 388 | static void ProcessConsoleEvents(float delta) { |
| 389 | if (stdin_available()) ProcessConsoleInput(); |
no test coverage detected