mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-22 10:39:18 +01:00
896911c279
Can detect the "type" of a Classic Controller, 2 = WUPC (1 = CCP, 0 = legacy CC)
40 lines
896 B
C
40 lines
896 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_WUPC
|
|
};
|
|
|
|
const char ctrlrName[5][0x20] =
|
|
{ "GameCube Controller", "Wiimote", "Nunchuk + Wiimote", "Classic Controller", "Wii U Pro Controller" };
|
|
|
|
typedef struct _btn_map {
|
|
u32 btn; // button 'id'
|
|
char* name; // button name
|
|
} BtnMap;
|
|
|
|
typedef struct _ctrlr_map {
|
|
BtnMap map[15]; // controller button map
|
|
int num_btns; // number of buttons on the controller
|
|
u16 type; // controller type
|
|
} CtrlrMap;
|
|
|
|
extern CtrlrMap ctrlr_def[5];
|
|
|
|
#endif
|