| 446 | } |
| 447 | |
| 448 | static bool QueryProfileActionToDo(Input& in, const InputProfile& profile, UserAction action, bool& actionDone, |
| 449 | bool reset, bool checkFocus) |
| 450 | { |
| 451 | if (actionDone && in.actionDone[action]) |
| 452 | return false; |
| 453 | if (reset) |
| 454 | { |
| 455 | actionDone = true; |
| 456 | in.actionDone[action] = true; |
| 457 | } |
| 458 | |
| 459 | bool found = false; |
| 460 | for (const InputBinding& binding : profile.GetBindingEntries(action)) |
| 461 | { |
| 462 | if (!ProfileModifierHeld(in, binding.modifier, checkFocus)) |
| 463 | continue; |
| 464 | if (QueryProfileCodeToDo(in, binding.code, false, checkFocus)) |
| 465 | found = true; |
| 466 | } |
| 467 | return found; |
| 468 | } |
| 469 | |
| 470 | InputSubsystem& InputSubsystem::Instance() |
| 471 | { |
| 472 | static InputSubsystem instance; |
| 473 | return instance; |
| 474 | } |
| 475 |
no test coverage detected