comparison src/joystick/linux/SDL_sysjoystick.c @ 1659:14717b52abc0 SDL-1.3

Merge trunk-1.3-3
author Sam Lantinga <slouken@libsdl.org>
date Wed, 17 May 2006 08:18:28 +0000
parents 92947e3a18db
children 782fd950bd46
comparison
equal deleted inserted replaced
1658:e49147870aac 1659:14717b52abc0
28 #include <sys/stat.h> 28 #include <sys/stat.h>
29 #include <unistd.h> 29 #include <unistd.h>
30 #include <fcntl.h> 30 #include <fcntl.h>
31 #include <sys/ioctl.h> 31 #include <sys/ioctl.h>
32 #include <limits.h> /* For the definition of PATH_MAX */ 32 #include <limits.h> /* For the definition of PATH_MAX */
33 #ifdef __arm__
34 #include <linux/limits.h> /* Arm cross-compiler needs this */
35 #endif
36 #include <linux/joystick.h> 33 #include <linux/joystick.h>
37 #if SDL_INPUT_LINUXEV 34 #if SDL_INPUT_LINUXEV
38 #include <linux/input.h> 35 #include <linux/input.h>
39 #endif 36 #endif
40 37
978 Uint8 other_axis; 975 Uint8 other_axis;
979 976
980 #ifndef NO_LOGICAL_JOYSTICKS 977 #ifndef NO_LOGICAL_JOYSTICKS
981 if (SDL_joylist[joystick->index].fname == NULL) { 978 if (SDL_joylist[joystick->index].fname == NULL) {
982 SDL_joylist_head(i, joystick->index); 979 SDL_joylist_head(i, joystick->index);
983 return JS_HandleEvents(SDL_joylist[i].joy); 980 JS_HandleEvents(SDL_joylist[i].joy);
981 return;
984 } 982 }
985 #endif 983 #endif
986 984
987 while ((len=read(joystick->hwdata->fd, events, (sizeof events))) > 0) { 985 while ((len=read(joystick->hwdata->fd, events, (sizeof events))) > 0) {
988 len /= sizeof(events[0]); 986 len /= sizeof(events[0]);