| 409 | } |
| 410 | |
| 411 | void Input::SimulateButtonPress(Input::InputButton button) { |
| 412 | switch (button) { |
| 413 | case Input::UP: |
| 414 | case Input::DOWN: |
| 415 | case Input::LEFT: |
| 416 | case Input::RIGHT: |
| 417 | { |
| 418 | // Directional movement has its own input handling |
| 419 | // These buttons need to be simulated on a lower level, |
| 420 | // or else those movement actions will be overwritten |
| 421 | auto& cfg = source->GetConfig(); |
| 422 | for (auto& bm : cfg.buttons) { |
| 423 | if (bm.first == button) { |
| 424 | source->SimulateKeyPress(bm.second); |
| 425 | break; |
| 426 | } |
| 427 | } |
| 428 | break; |
| 429 | } |
| 430 | default: |
| 431 | break; |
| 432 | } |
| 433 | UpdateButton(button, true); |
| 434 | } |
nothing calls this directly
no test coverage detected