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

Function CalcStateHash

engine/hid/src/hid.cpp:580–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578 }
579
580 dmhash_t CalcStateHash(HContext context)
581 {
582 HashState64 state;
583 dmHashInit64(&state, false);
584 dmHashUpdateBuffer64(&state, &context->m_Keyboards[0], MAX_KEYBOARD_COUNT * sizeof(Keyboard));
585 dmHashUpdateBuffer64(&state, &context->m_Mice[0], MAX_MOUSE_COUNT * sizeof(Mouse));
586 dmHashUpdateBuffer64(&state, &context->m_Gamepads[0], MAX_GAMEPAD_COUNT * sizeof(Gamepad));
587 dmHashUpdateBuffer64(&state, &context->m_TouchDevices[0], MAX_TOUCH_DEVICE_COUNT * sizeof(TouchDevice));
588 dmHashUpdateBuffer64(&state, &context->m_TextPacket, sizeof(TextPacket));
589 dmHashUpdateBuffer64(&state, &context->m_AccelerationPacket, sizeof(context->m_AccelerationPacket));
590 return dmHashFinal64(&state);
591 }
592}

Callers 2

UpdateFunction · 0.85
UpdateFunction · 0.85

Calls 3

dmHashInit64Function · 0.85
dmHashUpdateBuffer64Function · 0.85
dmHashFinal64Function · 0.85

Tested by

no test coverage detected