1
0
mirror of https://github.com/raphnet/4nes4snes synced 2024-11-11 19:45:02 -05:00
4nes4snes/gamepad.h

28 lines
573 B
C
Raw Normal View History

2007-03-24 22:59:30 -04:00
#ifndef _gamepad_h__
#define _gamepad_h__
typedef struct {
// size of reports built by buildReport
2007-04-18 19:58:01 -04:00
char num_reports;
2007-03-24 22:59:30 -04:00
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);
2007-04-18 19:58:01 -04:00
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);
2007-03-24 22:59:30 -04:00
} Gamepad;
#endif // _gamepad_h__