| 560 | } |
| 561 | |
| 562 | bool controller_button_state(int32_t input_id) { |
| 563 | if (input_id >= 0 && input_id < SDL_GameControllerButton::SDL_CONTROLLER_BUTTON_MAX) { |
| 564 | SDL_GameControllerButton button = (SDL_GameControllerButton)input_id; |
| 565 | bool ret = false; |
| 566 | { |
| 567 | std::lock_guard lock{ InputState.cur_controllers_mutex }; |
| 568 | for (const auto& controller : InputState.cur_controllers) { |
| 569 | ret |= SDL_GameControllerGetButton(controller, button); |
| 570 | } |
| 571 | } |
| 572 | |
| 573 | return ret; |
| 574 | } |
| 575 | return false; |
| 576 | } |
| 577 | |
| 578 | static std::atomic_bool right_analog_suppressed = false; |
| 579 |
no outgoing calls
no test coverage detected