MCPcopy Create free account
hub / github.com/JibbSmart/JoyShockMapper / InsertEventMapping

Method InsertEventMapping

JoyShockMapper/src/main.cpp:508–517  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508void Mapping::InsertEventMapping(BtnEvent evt, OnEventAction action) {
509 auto existingActions = eventMapping.find(evt);
510
511 if (existingActions == eventMapping.end()) {
512 eventMapping[evt] = action;
513 } else {
514 // Chain with already existing mapping, if any
515 eventMapping[evt] = bind(&RunBothActions, placeholders::_1, existingActions->second, action);
516 }
517}
518
519bool Mapping::AddMapping(KeyCode key, EventModifier evtMod, ActionModifier actMod)
520{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected