| 42 | bool g_Init = false; |
| 43 | |
| 44 | HContext NewContext(const NewContextParams& params) |
| 45 | { |
| 46 | if (!g_Init) |
| 47 | { |
| 48 | InitKeyMap(); |
| 49 | InitMouseButtonMap(); |
| 50 | g_Init = true; |
| 51 | } |
| 52 | Context* context = new Context(); |
| 53 | context->m_GamepadIndices.SetCapacity(16); |
| 54 | context->m_UnmappedGamepads.SetCapacity(7, 16); |
| 55 | context->m_HidContext = params.m_HidContext; |
| 56 | context->m_RepeatDelay = params.m_RepeatDelay; |
| 57 | context->m_RepeatInterval = params.m_RepeatInterval; |
| 58 | context->m_PressedThreshold = 0.9f; |
| 59 | return context; |
| 60 | } |
| 61 | |
| 62 | void DeleteContext(HContext context) |
| 63 | { |