MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / IsKbmCode

Function IsKbmCode

engine/Poseidon/UI/Settings/ControlsConfig.cpp:31–37  ·  view source on GitHub ↗

True if the packed binding belongs in controls.cfg (keyboard scancodes or mouse buttons). Joystick-class entries (STICK / STICK_AXIS / STICK_POV) are persisted via GamepadConfig instead.

Source from the content-addressed store, hash-verified

29// or mouse buttons). Joystick-class entries (STICK / STICK_AXIS /
30// STICK_POV) are persisted via GamepadConfig instead.
31bool IsKbmCode(int packedCode)
32{
33 if (packedCode < 0)
34 return false;
35 int dev = packedCode & INPUT_DEVICE_MASK;
36 return dev == INPUT_DEVICE_KEYBOARD || dev == INPUT_DEVICE_MOUSE;
37}
38} // namespace
39
40void ControlsConfig::LoadDefaults()

Callers 3

LoadDefaultsMethod · 0.85
LoadMethod · 0.85
SaveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected