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

Function GamepadConnectivityCallback

engine/input/src/input.cpp:1292–1304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1290 }
1291
1292 bool GamepadConnectivityCallback(uint32_t gamepad_index, bool connected, void* userdata)
1293 {
1294 Context* context = (Context*)userdata;
1295 Binding* binding = (Binding*)context->m_Binding;
1296 if (!binding)
1297 {
1298 context->m_UnmappedGamepads.Put(gamepad_index, connected);
1299 return true; // Only return false if you wish to override the controller connection status!
1300 }
1301
1302 MapGamePad(binding, gamepad_index, connected);
1303 return true;
1304 }
1305}

Callers

nothing calls this directly

Calls 2

MapGamePadFunction · 0.85
PutMethod · 0.45

Tested by

no test coverage detected