Time-Based Notifications

You can notify the operating system to send joystick messages to an application at regular time intervals by setting the fChanged parameter of joySetCapture13794CD to FALSE and by specifying the interval length between successive messages. To do this, assign the uPeriod parameter a value between the minimum and maximum polling frequencies for the joystick. You can determine this range by using the joyGetDevCapsC8V8O5 function, which fills the wPeriodMin and wPeriodMax members in the JOYCAPS19ISN8B structure. If the uPeriod value is outside the range of valid polling frequencies for the joystick, the joystick driver uses the minimum or maximum polling frequency, whichever is closer to the uPeriod value.

 

Note  Windows sets up a timer event with each call to joySetCapture.