MCPcopy Create free account
hub / github.com/defold/defold / SetupGamepadBindings

Function SetupGamepadBindings

engine/input/src/input.cpp:251–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249 }
250
251 static void SetupGamepadBindings(HBinding binding)
252 {
253 for (uint32_t i = 0; i < binding->m_GamepadBindings.Size(); ++i)
254 {
255 delete binding->m_GamepadBindings[i];
256 }
257 binding->m_GamepadBindings.SetSize(0);
258 for (uint32_t gamepad_index = 0; gamepad_index < dmHID::MAX_GAMEPAD_COUNT; ++gamepad_index)
259 {
260 GamepadBinding* gamepad_binding = NewGamepadBinding(binding, gamepad_index);
261 if (gamepad_binding)
262 {
263 binding->m_GamepadBindings.Push(gamepad_binding);
264 }
265 }
266 }
267
268 static dmInputDDF::GamepadTrigger* CopyGamepadTrigger(const dmInputDDF::GamepadTrigger* orig, uint32_t count)
269 {

Callers 1

SetBindingFunction · 0.85

Calls 4

NewGamepadBindingFunction · 0.85
SizeMethod · 0.45
SetSizeMethod · 0.45
PushMethod · 0.45

Tested by

no test coverage detected