MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / ButtonReleased

Method ButtonReleased

Source/options.cpp:1773–1785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1771}
1772
1773void 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
1787void PadmapperOptions::ReleaseAllActiveButtons()
1788{

Callers 2

~ButtonReleaserMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected