Polled device (direct input)

Started by
1 comment, last by The C modest god 18 years, 9 months ago
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?
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower.Quote:Original post by Toolmaker Quote:Original post by The C modest godHow is my improoved signature?It sucks, just like you.
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

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

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.
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower.Quote:Original post by Toolmaker Quote:Original post by The C modest godHow is my improoved signature?It sucks, just like you.

This topic is closed to new replies.

Advertisement