MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / isBindingPressed

Function isBindingPressed

TheForceEngine/TFE_Input/inputMapping.cpp:594–611  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592 }
593
594 bool isBindingPressed(InputAction action)
595 {
596 u32 indices[2];
597 u32 count = inputMapping_getBindingsForAction(action, indices, 2);
598 if (count > 0)
599 {
600 InputBinding* binding = inputMapping_getBindingByIndex(indices[0]);
601 if (TFE_Input::keyPressed(binding->keyCode))
602 {
603 if (binding->keyMod && !TFE_Input::keyModDown(binding->keyMod, true))
604 {
605 return false;
606 }
607 return true;
608 }
609 }
610 return false;
611 }
612
613 bool inputMapping_handleInputs()
614 {

Callers 2

recordEventFunction · 0.85

Calls 4

keyPressedFunction · 0.85
keyModDownFunction · 0.85

Tested by

no test coverage detected