1
0
mirror of https://github.com/raphnet/4nes4snes synced 2024-12-22 06:58:51 -05:00
4nes4snes/gamepad.h

28 lines
582 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
2012-04-14 10:46:05 -04:00
char (*changed)(unsigned char id);
2007-04-18 19:58:01 -04:00
/**
* \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__