snes9xgx/source/ngc/button_mapping.h

41 lines
887 B
C
Raw Normal View History

2008-08-12 05:25:16 +02:00
/****************************************************************************
* Snes9x 1.51 Nintendo Wii/Gamecube Port
2008-08-12 05:25:16 +02:00
*
* michniewski August 2008
*
* button_mapping.h
*
* Controller button mapping
***************************************************************************/
2008-08-12 05:25:16 +02:00
#ifndef BTN_MAP_H
#define BTN_MAP_H
enum {
CTRLR_NONE = -1,
CTRLR_GCPAD,
CTRLR_WIIMOTE,
2009-03-11 18:28:37 +01:00
CTRLR_NUNCHUK,
CTRLR_CLASSIC
};
2009-03-11 18:28:37 +01:00
const char ctrlrName[4][20] =
{ "GameCube Controller", "Wiimote", "Nunchuk + Wiimote", "Classic Controller" };
typedef struct _btn_map {
u32 btn; // button 'id'
char* name; // button name
} BtnMap;
typedef struct _ctrlr_map {
u16 type; // controller type
int num_btns; // number of buttons on the controller
BtnMap map[15]; // controller button map
} CtrlrMap;
// externs:
extern CtrlrMap ctrlr_def[4];
#endif