KPADRead

C Specification

#include <revolution/kpadOld.h>
s32 KPADRead( s32 chan, KPADStatus samplingBufs[], u32 length );

Arguments

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.

Return Values

Returns the number of data sets actually stored.

Description

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 time of the previous call to the time of the current call. (In other words, the newest data is always stored at the beginning of the buffer.) However, button information references only the most recent value when KPADRead is called, and this value is copied to all current sampling buffers.

See Also

KPADStatus

Revision History

2006/03/01 Initial version.
2006/08/xx Added a link under See Also.
2006/10/25 Changed the name from Revolution SDK 2.3 to KPADOld library.


CONFIDENTIAL