| 1771 | } |
| 1772 | |
| 1773 | void PadmapperOptions::ButtonReleased(ControllerButton button, bool invokeAction) |
| 1774 | { |
| 1775 | if (invokeAction) { |
| 1776 | const Action *action = buttonToReleaseAction[static_cast<size_t>(button)]; |
| 1777 | if (action == nullptr) |
| 1778 | return; // Ignore unmapped buttons. |
| 1779 | |
| 1780 | // Check that the action can be triggered. |
| 1781 | if (action->actionReleased && (!action->enable || action->enable())) |
| 1782 | action->actionReleased(); |
| 1783 | } |
| 1784 | buttonToReleaseAction[static_cast<size_t>(button)] = nullptr; |
| 1785 | } |
| 1786 | |
| 1787 | void PadmapperOptions::ReleaseAllActiveButtons() |
| 1788 | { |
no outgoing calls
no test coverage detected