mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
SDL: Added connect/disconnect gamepad events.
This commit is contained in:
parent
cdc0c01503
commit
6315743251
1 changed files with 2 additions and 0 deletions
|
@ -502,6 +502,7 @@ namespace entry
|
|||
if (isValid(handle) )
|
||||
{
|
||||
m_gamepad[handle.idx].create(cev.which);
|
||||
m_eventQueue.postGamepadEvent(defaultWindow, handle, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -520,6 +521,7 @@ namespace entry
|
|||
{
|
||||
m_gamepad[handle.idx].destroy();
|
||||
m_gamepadAlloc.free(handle.idx);
|
||||
m_eventQueue.postGamepadEvent(defaultWindow, handle, false);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue