/dports/emulators/xsystem35/xsystem35-1.7.3-pre5/src/ |
H A D | joystick_linux.c | 56 joy_fd=open(dev_joy,O_RDONLY); in joy_open() 57 if( joy_fd < 0 ) { in joy_open() 59 return joy_fd; in joy_open() 61 ioctl(joy_fd,JSIOCGAXES,&joy_axes); in joy_open() 65 return joy_fd; in joy_open() 69 if( joy_fd < 0 ) return; in joy_close() 70 close(joy_fd); in joy_close() 82 max_fd = joy_fd+1; in joy_getinfo() 86 FD_SET(joy_fd,&set); in joy_getinfo() 88 if( FD_ISSET(joy_fd,&set) ) { in joy_getinfo() [all …]
|
/dports/games/tremulous/tremulous/tremulous-1.1.0-src/src/unix/ |
H A D | linux_joystick.c | 60 static int joy_fd = -1; variable 77 joy_fd = -1; in IN_StartupJoystick() 89 joy_fd = open( filename, O_RDONLY | O_NONBLOCK ); in IN_StartupJoystick() 91 if( joy_fd != -1 ) { in IN_StartupJoystick() 102 n = read( joy_fd, &event, sizeof( event ) ); in IN_StartupJoystick() 111 ioctl( joy_fd, JSIOCGAXES, &axes ); in IN_StartupJoystick() 112 ioctl( joy_fd, JSIOCGBUTTONS, &buttons ); in IN_StartupJoystick() 114 if( ioctl( joy_fd, JSIOCGNAME( sizeof( name ) ), name ) < 0 ) { in IN_StartupJoystick() 129 if( joy_fd == -1 ) { in IN_StartupJoystick() 148 if( joy_fd == -1 ) { in IN_JoyMove() [all …]
|
/dports/emulators/adamem/adamem-1.0_4/ |
H A D | Unix.c | 23 static int joy_fd; variable 30 joy_fd=open ("/dev/js0",O_RDONLY); in InitJoystick() 31 if (Verbose) puts ((joy_fd>=0)? "OK":"FAILED"); in InitJoystick() 32 return (joy_fd>=0); in InitJoystick() 37 if (joy_fd>=0) close (joy_fd); in TrashJoystick() 43 if (joy_fd>=0) in ReadJoystick() 45 read (joy_fd,&js,JS_RETURN); in ReadJoystick()
|
/dports/devel/allegro/allegro-4.4.3.1/src/linux/ |
H A D | ljoy.c | 45 static int joy_fd[MAX_JOYSTICKS]; variable 73 if (joy_fd[i] == -1) in joy_init() 80 joy_fd[i] = open(tmp, O_RDONLY|O_NONBLOCK); in joy_init() 81 if (joy_fd[i] == -1) { in joy_init() 85 joy_fd[i] = open(tmp, O_RDONLY|O_NONBLOCK); in joy_init() 86 if (joy_fd[i] == -1) in joy_init() 97 ioctl(joy_fd[i], JSIOCGAXES, &num_axes); in joy_init() 98 ioctl(joy_fd[i], JSIOCGBUTTONS, &num_buttons); in joy_init() 172 close(joy_fd[i]); in joy_exit() 204 FD_SET(joy_fd[i], &set); in joy_poll() [all …]
|
/dports/astro/openuniverse/openuniverse-1.0beta3/src/ |
H A D | joystick.cpp | 35 int joyavailable = 0, joyactive = 0, joy_fd; variable 97 status = read(joy_fd, &js, sizeof(struct js_event)); in joystick() 159 if ((joy_fd = open("/dev/js0", O_RDONLY)) < 0) in joydetect() 163 ioctl(joy_fd, JSIOCGVERSION, &version); in joydetect() 164 ioctl(joy_fd, JSIOCGAXES, &axes); in joydetect() 165 ioctl(joy_fd, JSIOCGBUTTONS, &buttons); in joydetect() 172 fcntl(joy_fd, F_SETFL, O_NONBLOCK); in joydetect()
|
/dports/games/qudos/QuDos-0.40.1-src/src/unix/ |
H A D | gl_glx.c | 82 static int joy_fd; variable 1231 joy_fd = open(pglob.gl_pathv[i], O_RDONLY | O_NONBLOCK); 1232 if (joy_fd == -1) { 1242 else if (read(joy_fd, &j, sizeof(struct joystick)) != -1) { 1245 while (read(joy_fd, &e, sizeof(struct js_event)) != -1 && 1278 if (read(joy_fd, &j, sizeof(struct joystick)) != -1) { 1291 while (read(joy_fd, &e, sizeof(struct js_event)) != -1) { 1309 if (close(joy_fd))
|
/dports/games/quake2lnx/quake2-r0.16.2/src/linux/ |
H A D | gl_glx.c | 78 static int joy_fd; variable 1043 joy_fd = open (pglob.gl_pathv[i], O_RDONLY | O_NONBLOCK); in OpenJoystick() 1044 if (joy_fd == -1) { in OpenJoystick() 1049 else if (read(joy_fd, &j, sizeof(struct joystick)) != -1) { in OpenJoystick() 1066 if (read(joy_fd, &j, sizeof(struct joystick)) != -1) { in PlatformJoyCommands() 1081 if (close(joy_fd)) in CloseJoystick()
|
H A D | rw_x11.c | 440 static int joy_fd; variable 469 joy_fd = open (pglob.gl_pathv[i], O_RDONLY | O_NONBLOCK); in OpenJoystick() 470 if (joy_fd == -1) { in OpenJoystick() 475 else if (read(joy_fd, &j, sizeof(struct joystick)) != -1) { in OpenJoystick() 621 if (close(joy_fd)) in CloseJoystick() 1984 if (read(joy_fd, &j, sizeof(struct joystick)) != -1) { in PlatformJoyCommands()
|
/dports/games/quake2-source/quake2-r0.16.2/src/linux/ |
H A D | gl_glx.c | 78 static int joy_fd; variable 1038 joy_fd = open (pglob.gl_pathv[i], O_RDONLY | O_NONBLOCK); in OpenJoystick() 1039 if (joy_fd == -1) { in OpenJoystick() 1045 while (read(joy_fd, &e, sizeof(struct js_event))!=-1 && in OpenJoystick() 1061 while (read(joy_fd, &e, sizeof(struct js_event))!=-1) { in PlatformJoyCommands() 1078 if (close(joy_fd)) in CloseJoystick()
|
H A D | rw_x11.c | 440 static int joy_fd; variable 469 joy_fd = open (pglob.gl_pathv[i], O_RDONLY | O_NONBLOCK); in OpenJoystick() 470 if (joy_fd == -1) { in OpenJoystick() 476 while (read(joy_fd, &e, sizeof(struct js_event))!=-1 && in OpenJoystick() 623 if (close(joy_fd)) in CloseJoystick() 1976 while (read(joy_fd, &e, sizeof(struct js_event))!=-1) { in PlatformJoyCommands()
|