(PS3) Keybind name LUT

This commit is contained in:
TwinAphex51224 2012-03-05 17:32:55 +01:00
parent b612bb5290
commit e4506d5a3e
4 changed files with 50 additions and 13 deletions

View File

@ -87,6 +87,42 @@ uint64_t platform_keybind_lut[SSNES_LAST_PLATFORM_KEY+1] =
CTRL_UP_MASK | CTRL_RSTICK_UP_MASK,
CTRL_DOWN_MASK | CTRL_RSTICK_DOWN_MASK,
};
char platform_keybind_name_lut[SSNES_LAST_PLATFORM_KEY+1][256] =
{
"Circle button",
"Cross button",
"Triangle button",
"Square button",
"D-Pad Up",
"D-Pad Down",
"D-Pad Left",
"D-Pad Right",
"Select button",
"Start button",
"L1 button",
"L2 button",
"L3 button",
"R1 button",
"R2 button",
"R3 button",
"LStick Left",
"LStick Right",
"LStick Up",
"LStick Down",
"LStick D-Pad Left",
"LStick D-Pad Right",
"LStick D-Pad Up",
"LStick D-Pad Down",
"RStick Left",
"RStick Right",
"RStick Up",
"RStick Down",
"RStick D-Pad Left",
"RStick D-Pad Right",
"RStick D-Pad Up",
"RStick D-Pad Down"
};
#elif defined(_XBOX)
#endif

View File

@ -68,6 +68,7 @@ enum
#endif
uint64_t platform_keybind_lut[SSNES_LAST_PLATFORM_KEY+1];
char platform_keybind_name_lut[SSNES_LAST_PLATFORM_KEY+1][256];
#endif
extern uint64_t default_keybind_lut[SSNES_FIRST_META_KEY];

View File

@ -559,7 +559,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_BUTTON_CROSS,
"Cross button",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_CROSS],
"",
0.0f,
0.0f,
@ -573,7 +573,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_BUTTON_SQUARE,
"Square button",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_SQUARE],
"",
0.0f,
0.0f,
@ -587,7 +587,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_BUTTON_SELECT,
"Select button",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_SELECT],
"",
0.0f,
0.0f,
@ -601,7 +601,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_BUTTON_START,
"Start button",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_START],
"",
0.0f,
0.0f,
@ -615,7 +615,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_DPAD_UP,
"D-Pad Up",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_UP],
"",
0.0f,
0.0f,
@ -629,7 +629,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_DPAD_DOWN,
"D-Pad Down",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_DOWN],
"",
0.0f,
0.0f,
@ -643,7 +643,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_DPAD_LEFT,
"D-Pad Left",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_LEFT],
"",
0.0f,
0.0f,
@ -657,7 +657,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_DPAD_RIGHT,
"D-Pad Right",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_RIGHT],
"",
0.0f,
0.0f,
@ -671,7 +671,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_BUTTON_CIRCLE,
"Circle button",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_CIRCLE],
"",
0.0f,
0.0f,
@ -685,7 +685,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_BUTTON_TRIANGLE,
"Triangle button",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_TRIANGLE],
"",
0.0f,
0.0f,
@ -699,7 +699,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_BUTTON_L1,
"L1 button",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_L1],
"",
0.0f,
0.0f,
@ -713,7 +713,7 @@ static item items_generalsettings[MAX_NO_OF_CONTROLS_SETTINGS] =
},
{
SETTING_CONTROLS_BUTTON_R1,
"R1 button",
platform_keybind_name_lut[PS3_DEVICE_ID_JOYPAD_R1],
"",
0.0f,
0.0f,

View File

@ -22,7 +22,7 @@
typedef struct
{
uint32_t enum_id; /* enum ID of item */
char text[256]; /* item label */
const char * text; /* item label */
char setting_text[256]; /* setting label */
float text_xpos; /* text X position (upper left corner) */
float text_ypos; /* text Y position (upper left corner) */