MCPcopy Create free account
hub / github.com/RevoSucks/BM64Recomp / controller_button_state

Function controller_button_state

src/game/input.cpp:562–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562bool 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
578static std::atomic_bool right_analog_suppressed = false;
579

Callers 2

get_input_analogMethod · 0.85
get_input_digitalMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected