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

Function Update

engine/hid/src/hid_null.cpp:61–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59 }
60
61 bool Update(HContext context)
62 {
63 dmPlatform::PollEvents(context->m_Window);
64 context->m_Keyboards[0].m_Connected = !context->m_IgnoreKeyboard;
65 context->m_Mice[0].m_Connected = !context->m_IgnoreMouse;
66 context->m_TouchDevices[0].m_Connected = !context->m_IgnoreTouchDevice;
67 context->m_Gamepads[0].m_Connected = !context->m_IgnoreGamepads;
68 context->m_Gamepads[0].m_ButtonCount = MAX_GAMEPAD_BUTTON_COUNT;
69 context->m_Gamepads[0].m_AxisCount = MAX_GAMEPAD_AXIS_COUNT;
70
71 dmhash_t prev_state_hash = context->m_StateHash;
72 context->m_StateHash = CalcStateHash(context);
73 return prev_state_hash != context->m_StateHash;
74 }
75
76 void GetGamepadDeviceName(HContext context, HGamepad gamepad, char name[MAX_GAMEPAD_NAME_LENGTH])
77 {

Callers

nothing calls this directly

Calls 2

CalcStateHashFunction · 0.85
PollEventsFunction · 0.50

Tested by

no test coverage detected