MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / InputBind_Set

Function InputBind_Set

src/Input.c:503–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

501}
502
503void InputBind_Set(InputBind binding, int btn, const struct InputDevice* device) {
504 cc_string name; char nameBuffer[STRING_SIZE];
505 cc_string value;
506 String_InitArray(name, nameBuffer);
507
508 String_Format1(&name, device->bindPrefix, bindNames[binding]);
509 value = String_FromReadonly(Input_StorageNames[btn]);
510 Options_SetString(&name, &value);
511
512 BindMapping_Set(&device->currentBinds[binding], btn, 0);
513}
514
515void InputBind_Reset(InputBind binding, const struct InputDevice* device) {
516 cc_string name; char nameBuffer[STRING_SIZE];

Callers 1

Calls 3

String_Format1Function · 0.85
String_FromReadonlyFunction · 0.85
Options_SetStringFunction · 0.85

Tested by

no test coverage detected