| 67 | } |
| 68 | |
| 69 | void JoystickReader::loop() { |
| 70 | while (!terminate) { |
| 71 | connect_once_and_read_until_error(); |
| 72 | // Error / no joystick found, try again later |
| 73 | std::this_thread::sleep_for(std::chrono::seconds(3)); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | void JoystickReader::connect_once_and_read_until_error() { |
| 78 | // We only need SDL "Joy", and are not interested in any display output or |
nothing calls this directly
no outgoing calls
no test coverage detected