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