beeanyew eaf0b75ba9 Disable keyboard input for now
Apparently termios performance is terrible. Should probably be in a thread non-blocked by the CPU emulation as well.
2020-12-04 08:35:22 +01:00

23 lines
370 B
C

#include <termios.h>
#include <unistd.h>
#include <linux/input.h>
int kbhit()
{
return 0;
}
extern int mouse_fd;
int get_mouse_status(char *x, char *y, char *b) {
struct input_event ie;
if (read(mouse_fd, &ie, sizeof(struct input_event)) != -1) {
*b = ((char *)&ie)[0];
*x = ((char *)&ie)[1];
*y = ((char *)&ie)[2];
return 1;
}
return 0;
}