linux-dist: Remove unnecessary if case

This commit is contained in:
Jan Holthuis 2015-08-11 20:20:12 +02:00
parent a6aab55ebb
commit 64152635b5
1 changed files with 16 additions and 17 deletions

View File

@ -142,26 +142,25 @@ void SetupInput()
lt[port]=0;
}
#if HOST_OS != OS_DARWIN && !defined(TARGET_EMSCRIPTEN)
if (true) {
#ifdef TARGET_PANDORA
const char* device = "/dev/input/event4";
#else
const char* device = "/dev/event2";
#endif
char name[256]= "Unknown";
if ((kbfd = open(device, O_RDONLY)) > 0) {
fcntl(kbfd,F_SETFL,O_NONBLOCK);
if(ioctl(kbfd, EVIOCGNAME(sizeof(name)), name) < 0) {
perror("evdev ioctl");
}
printf("The device on %s says its name is %s\n",device, name);
#ifdef TARGET_PANDORA
const char* device = "/dev/input/event4";
#else
const char* device = "/dev/event2";
#endif
char name[256]= "Unknown";
if ((kbfd = open(device, O_RDONLY)) > 0) {
fcntl(kbfd,F_SETFL,O_NONBLOCK);
if(ioctl(kbfd, EVIOCGNAME(sizeof(name)), name) < 0) {
perror("evdev ioctl");
}
else
perror("evdev open");
printf("The device on %s says its name is %s\n",device, name);
}
else
perror("evdev open");
// Open joystick device
JoyFD = open("/dev/input/js0",O_RDONLY);