Hello, I’m trying to implement Mouse input. I’ve brought up the topic in another thread when asking questions about the keyboard. The reason I made a whole new thread is caus Iv’e got the error:
Failed to poll device: Device is released
I’m trying to get the mouse movement using this loop:
m_mouse.poll();
m_mouseQueue = m_mouse.getEventQueue();
Event event = new Event();
while( m_mouseQueue.getNextEvent(event))
{
Component c = event.getComponent();
float data = c.getPollData();
if(data != 0.0f )
{
//boolean hash map
m_mouseDown.put(c.getIdentifier(), true);
//deadZone is always 0.0...
m_deltaMouse.x = m_mouse.getX().getPollData();
m_deltaMouse.x = m_mouse.getY().getPollData();
}
else
{
m_mouseDown.put(event.getComponent().getIdentifier(), false);
m_deltaMouse.x = 0.0f;
m_deltaMouse.x = 0.0f;
}
}
in my main loop I print the values to the output console in Eclipse and get:
Failed to poll device: Device is released
Failed to poll device: Device is released
delta mouse x : 0.0
delta mouse y : 0.0
Failed to poll device: Device is released
Failed to poll device: Device is released
delta mouse x : 0.0
delta mouse y : 0.0
Failed to poll device: Device is released
Failed to poll device: Device is released
delta mouse x : 0.0
and so on...
It seems like JInput looses and regains contact wit my mouse??
I’m using windows xp, and the mouse is a Razer Krait