1
0
mirror of https://github.com/raphnet/4nes4snes synced 2024-08-13 16:23:46 -04:00
4nes4snes/gamepad.h
Raphaël Assénat ec9d9997ab fixes
2007-04-18 23:58:01 +00:00

28 lines
573 B
C

#ifndef _gamepad_h__
#define _gamepad_h__
typedef struct {
// size of reports built by buildReport
char num_reports;
int reportDescriptorSize;
void *reportDescriptor; // must be in flash
int deviceDescriptorSize; // if 0, use default
void *deviceDescriptor; // must be in flash
void (*init)(void);
void (*update)(void);
char (*changed)(char id);
/**
* \param id Controller id (starting at 1 to match report IDs)
* \return The number of bytes written to buf.
* */
char (*buildReport)(unsigned char *buf, char id);
} Gamepad;
#endif // _gamepad_h__