GetControlPad

Gets control pad events.

Synopsis

Err GetControlPad( int32 padNumber, int32 wait,ControlPadEventData *data )

Description

This is a convenience call that allows a task to easily monitor events on controller pads. This function specifies a controller pad to monitor, specifies whether the routine should return immediately or wait until something happens on the controller pad, and provides a data structure for data from the controller pad.

When the function executes, it either returns immediately with event information or waits until there is a change in the controller pad before returning. If an event has occurred, the task must check the ControlPadEventData data structure for details about the event.

Arguments

padNumber
Sets the number of the generic controller pad on the control port (i.e., the first, second, third, and so on pad in the control port daisy chain, counting out from the 3DO unit) that the task wants to monitor. The first pad is 1, the second is 2, and so on.
wait
A boolean value that specifies the event brokersresponse.IfitisTRUE(a nonzero value), the event broker waits along with the task until an event occurs on the specified pad and only returns with data when there is a change in the pad. If it is FALSE
(zero), the event broker immediately returns with the status of the pad.
data
A pointer to a ControlPadEventData data structure for the returned control pad data to be stored.

Return Value

This function returns 1 if an event has occurred on the pad, 0 if no event has occurred on the pad, or a negative number (an error code) if a problem occurred while retrieving an event.

Implementation

Convenience call implemented in input.lib V20.

Associated Files

event.h, input.lib

See Also

InitEventUtility(), GetMouse(), KillEventUtility()