Add gamepad mouse emulation support

This commit is contained in:
Cameron Gutman
2019-05-19 12:17:23 -07:00
parent 4e4f04c174
commit fc8d5d5799
2 changed files with 126 additions and 0 deletions
+6
View File
@@ -13,6 +13,9 @@ struct GamepadState {
int hapticEffectId;
short index;
SDL_TimerID mouseEmulationTimer;
uint32_t lastStartDownTime;
short buttons;
short lsX, lsY;
short rsX, rsY;
@@ -82,6 +85,9 @@ private:
static
Uint32 mouseMoveTimerCallback(Uint32 interval, void* param);
static
Uint32 mouseEmulationTimerCallback(Uint32 interval, void* param);
bool m_MultiController;
SDL_TimerID m_MouseMoveTimer;
SDL_atomic_t m_MouseDeltaX;