move DevicesChanged polling into separate thread because the DInput calls block. Only supported if ThreadedInput=1.
This commit is contained in:
@@ -16,16 +16,22 @@ public:
|
||||
void WindowReset();
|
||||
|
||||
private:
|
||||
RageThread m_Thread;
|
||||
RageThread m_InputThread;
|
||||
RageThread m_DevicesChangedThread;
|
||||
bool m_bShutdown;
|
||||
int m_iLastSeenNumJoysticks; // use this to figure out if a joystick was plugged/unplugged
|
||||
|
||||
// Use these to figure out if a joystick was plugged/unplugged
|
||||
int m_iCurrentNumJoysticks;
|
||||
int m_iLastSeenNumJoysticks;
|
||||
|
||||
void UpdatePolled( DIDevice &device, const RageTimer &tm );
|
||||
void UpdateBuffered( DIDevice &device, const RageTimer &tm );
|
||||
void PollAndAcquireDevices( bool bBuffered );
|
||||
|
||||
static int InputThread_Start( void *p ) { ((InputHandler_DInput *) p)->InputThreadMain(); return 0; }
|
||||
static int InputThread_Start( void *p ) { ((InputHandler_DInput *) p)->InputThreadMain(); return 0; }
|
||||
static int DevicesChangedThread_Start( void *p ) { ((InputHandler_DInput *) p)->DevicesChangedThreadMain(); return 0; }
|
||||
void InputThreadMain();
|
||||
void DevicesChangedThreadMain();
|
||||
|
||||
void StartThread();
|
||||
void ShutdownThread();
|
||||
|
||||
Reference in New Issue
Block a user