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

Method LoadDefaults

engine/Poseidon/Input/InputProfile.cpp:136–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136void InputProfile::LoadDefaults()
137{
138 ClearAll();
139 UserActionDesc* descs = InputSubsystem::GetUserActionDesc();
140 for (int i = 0; i < UAN; i++)
141 {
142 const KeyList& keys = descs[i].keys;
143 for (int j = 0; j < keys.Size(); j++)
144 {
145 if (IsLegacyGamepadCode(keys[j]))
146 continue;
147 InputCode code = InputCode::FromLegacy(keys[j]);
148 if (code.valid())
149 Bind(static_cast<UserAction>(i), code);
150 }
151 }
152}
153
154void InputProfile::SetBindingsFromLegacy(UserAction action, const int* keys, int count)
155{

Callers 14

LoadDefaultProfilesMethod · 0.45
LoadKeysMethod · 0.45
LoadConfigMethod · 0.45

Calls 3

IsLegacyGamepadCodeFunction · 0.85
SizeMethod · 0.45
validMethod · 0.45

Tested by

no test coverage detected