| 51 | } |
| 52 | |
| 53 | void Input::UiSource::DoUpdate(bool system_only) { |
| 54 | keystates = DisplayUi->GetKeyStates(); |
| 55 | |
| 56 | pressed_buttons = {}; |
| 57 | |
| 58 | UpdateGamepad(); |
| 59 | UpdateTouch(); |
| 60 | |
| 61 | for (auto& bm: cfg.buttons) { |
| 62 | if (keymask[bm.second]) { |
| 63 | continue; |
| 64 | } |
| 65 | |
| 66 | if (!system_only || Input::IsSystemButton(bm.first)) { |
| 67 | pressed_buttons[bm.first] = pressed_buttons[bm.first] || keystates[bm.second] || keystates_virtual[bm.second]; |
| 68 | } |
| 69 | } |
| 70 | keystates_virtual = {}; |
| 71 | |
| 72 | Record(); |
| 73 | |
| 74 | mouse_pos = DisplayUi->GetMousePosition(); |
| 75 | } |
| 76 | |
| 77 | void Input::UiSource::Update() { |
| 78 | DoUpdate(false); |
nothing calls this directly
no test coverage detected