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 return std::find(binds.begin(), binds.end(), binding) != binds.end();
135}
136
137int InputProfile::BindingCount(UserAction action) const
138{
139 int idx = static_cast<int>(action);
140 if (idx < 0 || idx >= UAN)
141 return 0;
142 return static_cast<int>(bindings_[idx].size());
143}
144
145void InputProfile::LoadDefaults()
146{
147 ClearAll();
148 UserActionDesc* descs = InputSubsystem::GetUserActionDesc();
149 for (int i = 0; i < UAN; i++)
150 {
151 const KeyList& keys = descs[i].keys;
152 for (int j = 0; j < keys.Size(); j++)
153 {
154 if (IsLegacyGamepadCode(keys[j]))
155 continue;

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