Skip to content

Commit

Permalink
reverting atempted bug fix as caused other things to fail
Browse files Browse the repository at this point in the history
awaiting feedback from anyone seen this seg fault before attempting
blind fix
  • Loading branch information
chris authored and chris committed Sep 24, 2012
1 parent 0312c36 commit 6a29677
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -4,9 +4,9 @@
# rpi - uses xwindows to provide event handling
# rpi_noX - get keyboard events from raw input, xwindows not needed

#PLATFORM=xorg
PLATFORM=xorg
#PLATFORM=rpi
PLATFORM=rpi_noX
#PLATFORM=rpi_noX

####

Expand Down
4 changes: 2 additions & 2 deletions src/input.c
Expand Up @@ -246,7 +246,7 @@ bool *getKeys()
int n;

n = scandir ("/dev/input/by-path/", &eps, __dfilter, __dsort);
if (n > 0)
if (n >= 0)
{
// only check 1st usb keyboard....
char fn[256];
Expand Down Expand Up @@ -276,7 +276,7 @@ bool *getKeys()
if (ioctl(__key_fd, KDGKBMODE, &old_keyboard_mode) < 0) {
//return 0;
printf("couldn't get the keyboard, are you running via ssh\n");
printf("without setting evdev permissions? \n");
printf("or without setting evdev permissions? \n");
}

tcgetattr(__key_fd, &tty_attr_old);
Expand Down

0 comments on commit 6a29677

Please sign in to comment.