#include <revolution/kpadOld.h> s32 KPADRead( s32 chan, KPADStatus samplingBufs[], u32 length );
| chan | One of the WPAD_CHANn values. |
|---|---|
| samplingBufs | Pointer to the KPADStatus structure. |
| length | Maximum number of data sets to store. This value cannot exceed KPAD_MAX_READ_BUFS. |
Returns the number of data sets that are stored.
This function reads data in the KPADStatus structure type for each controller channel. We have assumed that this function will be called for each game frame. The buffer specified by the argument stores, from newest to oldest, the data sampled from the previous call's time to the current call's time. (In other words, the newest data is always stored at the beginning of the buffer.) However, for button information only, only the most recent values are referenced when KPADRead is called, and these values are copied to all current sampling buffers.
2006/10/25 Changed the name to KPADOld library, beginning with Revolution SDK 2.3.
2006/08/xx Added a link under See Also.
2006/03/01 Initial version.
CONFIDENTIAL