mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-01 08:25:12 +01:00
42 lines
908 B
C
42 lines
908 B
C
/****************************************************************************
|
|
* Visual Boy Advance GX
|
|
*
|
|
* Tantric September 2008
|
|
*
|
|
* button_mapping.h
|
|
*
|
|
* Controller button mapping
|
|
***************************************************************************/
|
|
|
|
#ifndef BTN_MAP_H
|
|
#define BTN_MAP_H
|
|
|
|
enum {
|
|
CTRLR_NONE = -1,
|
|
CTRLR_GCPAD,
|
|
CTRLR_WIIMOTE,
|
|
CTRLR_NUNCHUK,
|
|
CTRLR_CLASSIC,
|
|
CTRLR_KEYBOARD
|
|
};
|
|
|
|
const char ctrlrName[5][20] =
|
|
{ "GameCube Controller", "Wiimote", "Nunchuk + Wiimote", "Classic Controller", "Keyboard & Mouse" };
|
|
|
|
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[150]; // controller button map
|
|
} CtrlrMap;
|
|
|
|
// externs:
|
|
|
|
extern CtrlrMap ctrlr_def[5];
|
|
|
|
#endif
|