| 38 | static std::pair<std::pair<int, int>, int> evdevfds[AllInputsFlat::MAXJOYS]; |
| 39 | |
| 40 | int is_evdev(const char* source) |
| 41 | { |
| 42 | /* Extract the ev number from the dev filename */ |
| 43 | int evnum; |
| 44 | int ret = sscanf(source, "/dev/input/event%d", &evnum); |
| 45 | if (ret != 1) |
| 46 | return -1; |
| 47 | |
| 48 | if (evnum < 0 || evnum >= Global::shared_config.nb_controllers || evnum >= AllInputsFlat::MAXJOYS) { |
| 49 | return 0; |
| 50 | } |
| 51 | |
| 52 | return 1; |
| 53 | } |
| 54 | |
| 55 | int open_evdev(const char* source, int flags) |
| 56 | { |
no outgoing calls
no test coverage detected