The documentation for joySetCapture
says that if fChanged
is true, then messages are only sent when the position changes by more than the threshold. Since it doesn't mention the buttons, I would assume that it doesn't send messages when buttons are pressed. This seems like poor design to me, but if that's how it is, then you have to deal with it.
Why don't you want to use periodic polling messages? As long as you set the polling interval to something reasonable (such as 16 ms for a 60 Hz refresh rate), I can assure you that polling the joystick is NOT going to be the bottleneck in your application, so it's not a question of performance. There's no reason to set the polling interval to something really small, because the hardware simply doesn't send out updates that fast, so you'd just be wasting cycles processing the same data.
Finally, the multimedia joystick API is somewhat dated and has been superseded by DirectX. You should use DirectInput instead so that you can handle joysticks with more than 4 buttons or more than 2 axes. Furthermore, if you're using Xbox 360 controllers, you should use the XInput library to process those.