| 295 | } |
| 296 | |
| 297 | void open() |
| 298 | { |
| 299 | char jspath[] = "/dev/input/jsX"; |
| 300 | char *num = strchr(jspath, 'X'); |
| 301 | |
| 302 | for (u32 ii = 0; ii < CROWN_MAX_JOYPADS; ++ii) { |
| 303 | *num = '0' + ii; |
| 304 | _fd[ii] = ::open(jspath, O_RDONLY); |
| 305 | _queue->push_status_event(InputDeviceType::JOYPAD, ii, _fd[ii] >= 0); |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | void close() |
| 310 | { |
no test coverage detected