void InputHandler_DInput::Update(float fDeltaTime) { RageTimer zero; zero.SetZero(); /* Handle polled devices. */ PollAndAcquireDevices(); for( unsigned i = 0; i < Devices.size(); ++i ) { if( !Devices[i].buffered ) UpdatePolled( Devices[i], zero ); else if( !InputThread.IsCreated() ) { /* If we have an input thread, it'll handle buffered devices. */ UpdateBuffered( Devices[i], zero ); } } InputHandler::UpdateTimer(); }
void Update() { //ZDebugOutput("Mouse Update\n"); if (m_bEnabled) { //ZDebugOutput("Mouse Enabled\n"); HRESULT hr = m_pdid->Acquire(); // // We have to handle the case where another app has captured the // mouse, since we may have been switched out. // if (hr != DIERR_OTHERAPPHASPRIO) { DDCall(hr); if (m_bBuffered) { UpdateBuffered(); } else { UpdatePolled(); } } } }