MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / CtlFindBinding

Function CtlFindBinding

Descent3/ctlconfig.cpp:1407–1422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1405 Skip_render_game_frame = false;
1406}
1407int CtlFindBinding(int controlid, bool keyboard) {
1408 int i = 0;
1409
1410 if (keyboard) {
1411 for (i = 0; i < N_KEY_CFG_FN; i++) {
1412 if (Cfg_key_elements[i].fn_id == controlid)
1413 return i;
1414 }
1415 } else {
1416 for (i = 0; i < N_JOY_CFG_FN; i++) {
1417 if (Cfg_joy_elements[i].fn_id == controlid)
1418 return i;
1419 }
1420 }
1421 return -1;
1422}

Callers 2

GetControllerBindingTextFunction · 0.85
GetKeyBindingTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected