mirror of
https://github.com/celisej567/source-engine.git
synced 2026-09-19 20:09:06 +03:00
inputsystem: fix UB in touch events callback, make touch more responsive
This commit is contained in:
@@ -44,6 +44,8 @@
|
||||
|
||||
#include "steam/steam_api.h"
|
||||
|
||||
#define TOUCH_FINGER_MAX_COUNT 10
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Implementation of the input system
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -101,7 +103,7 @@ public:
|
||||
virtual void *GetHapticsInterfaceAddress() const { return NULL;}
|
||||
#endif
|
||||
bool GetRawMouseAccumulators( int& accumX, int& accumY );
|
||||
bool GetTouchAccumulators( InputEventType_t &event, int &fingerId, int& accumX, int& accumY );
|
||||
virtual bool GetTouchAccumulators( int fingerId, float &dx, float &dy );
|
||||
|
||||
virtual void SetConsoleTextMode( bool bConsoleTextMode );
|
||||
|
||||
@@ -458,8 +460,7 @@ public:
|
||||
bool m_bRawInputSupported;
|
||||
int m_mouseRawAccumX, m_mouseRawAccumY;
|
||||
|
||||
InputEventType_t m_touchAccumEvent;
|
||||
int m_touchAccumFingerId, m_touchAccumX, m_touchAccumY;
|
||||
float m_touchAccumX[TOUCH_FINGER_MAX_COUNT], m_touchAccumY[TOUCH_FINGER_MAX_COUNT];
|
||||
|
||||
// For the 'SleepUntilInput' feature
|
||||
HANDLE m_hEvent;
|
||||
|
||||
Reference in New Issue
Block a user