Jump to content
  • Advertisement
Sign in to follow this  
The C modest god

Polled device (direct input)

This topic is 4844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When I tried to set a property on my joystick device of the size of a buffer, it produced an error stating that: "The device is a polled device. As a result, device buffering does not collect any data and event notifications is not signaled until the IDirectInputDevice8::Poll method is called. " So I check the device capabilities and in dwFlags the DIDC_POLLEDDEVICE was on. However, on this flag it is stated that: "At least one object on the device is polled, rather than interrupt-driven. For these objects, the application must explicitly call the IDirectInputDevice8::Poll method to obtain data. HID devices can contain a mixture of polled and nonpolled objects. " There is nothing saying that the device has no buffer, it just says that I must use poll (which I use anyway even for non polled devices) So does it also mean that this device necessarly doesnt have a buffer as well? and that I must use getDeviceState instead of getDeviceBuffer?

Share this post


Link to post
Share on other sites
Advertisement
If memory serves me right, and the information you quoted seems to follow that - you get two typed of input device. They offer fundamentally different ways of operating - as a consequence you can't really mix-and-match.

Either you poll the device at your own convenience via GetDeviceState(); alternatively allow DInput to handle the actual polling and collect the buffer via GetDeviceBuffer() whenever you want to know what happened.

What exactly are you you trying to do that this causes a problem with?
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by jollyjeffers
If memory serves me right, and the information you quoted seems to follow that - you get two typed of input device. They offer fundamentally different ways of operating - as a consequence you can't really mix-and-match.

Either you poll the device at your own convenience via GetDeviceState(); alternatively allow DInput to handle the actual polling and collect the buffer via GetDeviceBuffer() whenever you want to know what happened.

What exactly are you you trying to do that this causes a problem with?
Jack


In addition to GetDeviceData and GetDeviceState there is a Poll method. I think calling Poll with a device that is interrupt driven is harmless, so I call the Poll method anyway.
I am trying to create a map for a joystick, but the joystick could be either Poll (state) driven or interrupt(buffer) driven. So I need to know when the joystick device is the first option and when its the second option.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!