mirror of
https://github.com/libretro/RetroArch
synced 2025-02-03 08:54:13 +00:00
add left/right callbacks
This commit is contained in:
parent
b93417fbed
commit
c8752ec630
@ -91,7 +91,7 @@ void input_mapper_poll(input_mapper_t *handle)
|
|||||||
{
|
{
|
||||||
if(i < RETROK_LAST)
|
if(i < RETROK_LAST)
|
||||||
{
|
{
|
||||||
if (input_state(0, RETRO_DEVICE_JOYPAD, handle->port, i))
|
if (input_state(handle->port, RETRO_DEVICE_JOYPAD, 0, i))
|
||||||
{
|
{
|
||||||
MAPPER_SET_KEY (handle, settings->uints.input_keymapper_ids[i]);
|
MAPPER_SET_KEY (handle, settings->uints.input_keymapper_ids[i]);
|
||||||
input_keyboard_event(true, settings->uints.input_keymapper_ids[i], 0, 0, RETRO_DEVICE_KEYBOARD);
|
input_keyboard_event(true, settings->uints.input_keymapper_ids[i], 0, 0, RETRO_DEVICE_KEYBOARD);
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
cbs->action_get_value_ident = #name;
|
cbs->action_get_value_ident = #name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern struct key_desc key_descriptors[192];
|
extern struct key_desc key_descriptors[MENU_SETTINGS_INPUT_DESC_KBD_END];
|
||||||
|
|
||||||
static void menu_action_setting_disp_set_label_cheat_num_passes(
|
static void menu_action_setting_disp_set_label_cheat_num_passes(
|
||||||
file_list_t* list,
|
file_list_t* list,
|
||||||
@ -497,74 +497,22 @@ static void menu_action_setting_disp_set_label_input_desc_kbd(
|
|||||||
const char *path,
|
const char *path,
|
||||||
char *s2, size_t len2)
|
char *s2, size_t len2)
|
||||||
{
|
{
|
||||||
RARCH_LOG("%d %s\n", key_descriptors[10].id, key_descriptors[10].desc);
|
|
||||||
char descriptor[255];
|
|
||||||
const struct retro_keybind *auto_bind = NULL;
|
|
||||||
const struct retro_keybind *keybind = NULL;
|
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
unsigned inp_desc_index_offset =
|
unsigned key_id;
|
||||||
type - MENU_SETTINGS_INPUT_DESC_BEGIN;
|
unsigned remap_id =
|
||||||
unsigned inp_desc_user = inp_desc_index_offset /
|
settings->uints.input_keymapper_ids[type - MENU_SETTINGS_INPUT_DESC_KBD_BEGIN];
|
||||||
(RARCH_FIRST_CUSTOM_BIND + 4);
|
char desc[PATH_MAX_LENGTH];
|
||||||
unsigned inp_desc_button_index_offset = inp_desc_index_offset -
|
|
||||||
(inp_desc_user * (RARCH_FIRST_CUSTOM_BIND + 4));
|
|
||||||
unsigned remap_id = 0;
|
|
||||||
|
|
||||||
if (!settings)
|
if (!settings)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
descriptor[0] = '\0';
|
for (key_id = 0; key_id < MENU_SETTINGS_INPUT_DESC_KBD_END - 1; key_id++)
|
||||||
|
|
||||||
remap_id = settings->uints.input_remap_ids
|
|
||||||
[inp_desc_user][inp_desc_button_index_offset];
|
|
||||||
|
|
||||||
keybind = &input_config_binds[inp_desc_user][remap_id];
|
|
||||||
auto_bind = (const struct retro_keybind*)
|
|
||||||
input_config_get_bind_auto(inp_desc_user, remap_id);
|
|
||||||
|
|
||||||
input_config_get_bind_string(descriptor,
|
|
||||||
keybind, auto_bind, sizeof(descriptor));
|
|
||||||
|
|
||||||
if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND)
|
|
||||||
{
|
{
|
||||||
if(strstr(descriptor, "Auto") && !strstr(descriptor,
|
if(remap_id == key_descriptors[key_id].key)
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE)))
|
|
||||||
strlcpy(s,
|
|
||||||
descriptor,
|
|
||||||
len);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const struct retro_keybind *keyptr = &input_config_binds[inp_desc_user]
|
|
||||||
[remap_id];
|
|
||||||
|
|
||||||
strlcpy(s, msg_hash_to_str(keyptr->enum_idx), len);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const char *str = NULL;
|
|
||||||
switch (remap_id)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
str = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
str = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
str = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
str = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
snprintf(desc, sizeof(desc), "Keyboard %s", key_descriptors[key_id].desc);
|
||||||
if (!string_is_empty(str))
|
strlcpy(s, desc, len);
|
||||||
strlcpy(s, str, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
*w = 19;
|
*w = 19;
|
||||||
strlcpy(s2, path, len2);
|
strlcpy(s2, path, len2);
|
||||||
|
@ -46,6 +46,8 @@
|
|||||||
} while(0)
|
} while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern struct key_desc key_descriptors[MENU_SETTINGS_INPUT_DESC_KBD_END];
|
||||||
|
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
static int generic_shader_action_parameter_left(
|
static int generic_shader_action_parameter_left(
|
||||||
struct video_shader_parameter *param,
|
struct video_shader_parameter *param,
|
||||||
@ -111,6 +113,35 @@ static int action_left_input_desc(unsigned type, const char *label,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int action_left_input_desc_kbd(unsigned type, const char *label,
|
||||||
|
bool wraparound)
|
||||||
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
unsigned key_id;
|
||||||
|
unsigned offset = type - MENU_SETTINGS_INPUT_DESC_KBD_BEGIN;
|
||||||
|
unsigned remap_id =
|
||||||
|
settings->uints.input_keymapper_ids[offset];
|
||||||
|
char desc[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
if (!settings)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
for (key_id = 0; key_id < MENU_SETTINGS_INPUT_DESC_KBD_END - 1; key_id++)
|
||||||
|
{
|
||||||
|
if(remap_id == key_descriptors[key_id].key)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (key_id > 1)
|
||||||
|
key_id--;
|
||||||
|
else
|
||||||
|
key_id = MENU_SETTINGS_INPUT_DESC_KBD_END - 1;
|
||||||
|
|
||||||
|
settings->uints.input_keymapper_ids[offset] = key_descriptors[key_id].key;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static int action_left_scroll(unsigned type, const char *label,
|
static int action_left_scroll(unsigned type, const char *label,
|
||||||
bool wraparound)
|
bool wraparound)
|
||||||
{
|
{
|
||||||
@ -538,6 +569,11 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
|
|||||||
{
|
{
|
||||||
BIND_ACTION_LEFT(cbs, action_left_input_desc);
|
BIND_ACTION_LEFT(cbs, action_left_input_desc);
|
||||||
}
|
}
|
||||||
|
else if (type >= MENU_SETTINGS_INPUT_DESC_KBD_BEGIN
|
||||||
|
&& type <= MENU_SETTINGS_INPUT_DESC_KBD_END)
|
||||||
|
{
|
||||||
|
BIND_ACTION_LEFT(cbs, action_left_input_desc_kbd);
|
||||||
|
}
|
||||||
else if ((type >= MENU_SETTINGS_PLAYLIST_ASSOCIATION_START))
|
else if ((type >= MENU_SETTINGS_PLAYLIST_ASSOCIATION_START))
|
||||||
{
|
{
|
||||||
BIND_ACTION_LEFT(cbs, playlist_association_left);
|
BIND_ACTION_LEFT(cbs, playlist_association_left);
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
#include "../../managers/cheat_manager.h"
|
#include "../../managers/cheat_manager.h"
|
||||||
#include "../../file_path_special.h"
|
#include "../../file_path_special.h"
|
||||||
#include "../../retroarch.h"
|
#include "../../retroarch.h"
|
||||||
|
#include "../../verbosity.h"
|
||||||
#include "../../ui/ui_companion_driver.h"
|
#include "../../ui/ui_companion_driver.h"
|
||||||
|
|
||||||
#ifndef BIND_ACTION_RIGHT
|
#ifndef BIND_ACTION_RIGHT
|
||||||
@ -47,6 +48,8 @@
|
|||||||
} while(0)
|
} while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern struct key_desc key_descriptors[MENU_SETTINGS_INPUT_DESC_KBD_END];
|
||||||
|
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
static int generic_shader_action_parameter_right(struct video_shader_parameter *param,
|
static int generic_shader_action_parameter_right(struct video_shader_parameter *param,
|
||||||
unsigned type, const char *label, bool wraparound)
|
unsigned type, const char *label, bool wraparound)
|
||||||
@ -99,26 +102,55 @@ int action_right_cheat(unsigned type, const char *label,
|
|||||||
wraparound);
|
wraparound);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int action_right_input_desc_kbd(unsigned type, const char *label,
|
||||||
|
bool wraparound)
|
||||||
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
unsigned key_id;
|
||||||
|
unsigned offset = type - MENU_SETTINGS_INPUT_DESC_KBD_BEGIN;
|
||||||
|
unsigned remap_id =
|
||||||
|
settings->uints.input_keymapper_ids[offset];
|
||||||
|
char desc[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
if (!settings)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
for (key_id = 0; key_id < MENU_SETTINGS_INPUT_DESC_KBD_END - 1; key_id++)
|
||||||
|
{
|
||||||
|
if(remap_id == key_descriptors[key_id].key)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (key_id < MENU_SETTINGS_INPUT_DESC_KBD_END - 1)
|
||||||
|
key_id++;
|
||||||
|
else
|
||||||
|
key_id = 0;
|
||||||
|
|
||||||
|
settings->uints.input_keymapper_ids[offset] = key_descriptors[key_id].key;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int action_right_input_desc(unsigned type, const char *label,
|
int action_right_input_desc(unsigned type, const char *label,
|
||||||
bool wraparound)
|
bool wraparound)
|
||||||
{
|
{
|
||||||
unsigned inp_desc_index_offset = type - MENU_SETTINGS_INPUT_DESC_BEGIN;
|
unsigned inp_desc_index_offset = type - MENU_SETTINGS_INPUT_DESC_BEGIN;
|
||||||
unsigned inp_desc_user = inp_desc_index_offset / (RARCH_FIRST_CUSTOM_BIND + 4);
|
unsigned inp_desc_user = inp_desc_index_offset / (RARCH_FIRST_CUSTOM_BIND + 4);
|
||||||
unsigned inp_desc_button_index_offset = inp_desc_index_offset - (inp_desc_user * (RARCH_FIRST_CUSTOM_BIND + 4));
|
unsigned inp_desc_button_index_offset = inp_desc_index_offset - (inp_desc_user * (RARCH_FIRST_CUSTOM_BIND + 4));
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND)
|
if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND)
|
||||||
{
|
{
|
||||||
if (settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset] < RARCH_FIRST_CUSTOM_BIND - 1)
|
if (settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset] < RARCH_FIRST_CUSTOM_BIND - 1)
|
||||||
settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset]++;
|
settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset]++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset] < 4 - 1)
|
if (settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset] < 4 - 1)
|
||||||
settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset]++;
|
settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset]++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int action_right_scroll(unsigned type, const char *label,
|
static int action_right_scroll(unsigned type, const char *label,
|
||||||
@ -406,6 +438,11 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
|
|||||||
{
|
{
|
||||||
BIND_ACTION_RIGHT(cbs, action_right_input_desc);
|
BIND_ACTION_RIGHT(cbs, action_right_input_desc);
|
||||||
}
|
}
|
||||||
|
else if (type >= MENU_SETTINGS_INPUT_DESC_KBD_BEGIN
|
||||||
|
&& type <= MENU_SETTINGS_INPUT_DESC_KBD_END)
|
||||||
|
{
|
||||||
|
BIND_ACTION_RIGHT(cbs, action_right_input_desc_kbd);
|
||||||
|
}
|
||||||
else if ((type >= MENU_SETTINGS_PLAYLIST_ASSOCIATION_START))
|
else if ((type >= MENU_SETTINGS_PLAYLIST_ASSOCIATION_START))
|
||||||
{
|
{
|
||||||
BIND_ACTION_RIGHT(cbs, playlist_association_right);
|
BIND_ACTION_RIGHT(cbs, playlist_association_right);
|
||||||
|
274
menu/menu_cbs.c
274
menu/menu_cbs.c
@ -32,149 +32,149 @@ static void menu_cbs_init_log(const char *entry_label, const char *bind_label, c
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
struct key_desc key_descriptors[192] =
|
struct key_desc key_descriptors[MENU_SETTINGS_INPUT_DESC_KBD_END] =
|
||||||
{
|
{
|
||||||
{RETROK_FIRST , 0, "Unmapped"},
|
{RETROK_FIRST, "Unmapped"},
|
||||||
{RETROK_BACKSPACE , 8, "Backspace"},
|
{RETROK_BACKSPACE, "Backspace"},
|
||||||
{RETROK_TAB , 9, "Tab"},
|
{RETROK_TAB, "Tab"},
|
||||||
{RETROK_CLEAR , 12, "Clear"},
|
{RETROK_CLEAR, "Clear"},
|
||||||
{RETROK_RETURN , 13, "Return"},
|
{RETROK_RETURN, "Return"},
|
||||||
{RETROK_PAUSE , 19, "Pause"},
|
{RETROK_PAUSE, "Pause"},
|
||||||
{RETROK_ESCAPE , 27, "Escape"},
|
{RETROK_ESCAPE, "Escape"},
|
||||||
{RETROK_SPACE , 32, "Space"},
|
{RETROK_SPACE, "Space"},
|
||||||
{RETROK_EXCLAIM , 33, "!"},
|
{RETROK_EXCLAIM, "!"},
|
||||||
{RETROK_QUOTEDBL , 34, "\""},
|
{RETROK_QUOTEDBL, "\""},
|
||||||
{RETROK_HASH , 35, "#"},
|
{RETROK_HASH, "#"},
|
||||||
{RETROK_DOLLAR , 36, "$"},
|
{RETROK_DOLLAR, "$"},
|
||||||
{RETROK_AMPERSAND , 38, "&"},
|
{RETROK_AMPERSAND, "&"},
|
||||||
{RETROK_QUOTE , 39, "\'"},
|
{RETROK_QUOTE, "\'"},
|
||||||
{RETROK_LEFTPAREN , 40, ")"},
|
{RETROK_LEFTPAREN, "("},
|
||||||
{RETROK_RIGHTPAREN , 41, ")"},
|
{RETROK_RIGHTPAREN, ")"},
|
||||||
{RETROK_ASTERISK , 42, "*"},
|
{RETROK_ASTERISK, "*"},
|
||||||
{RETROK_PLUS , 43, "+"},
|
{RETROK_PLUS, "+"},
|
||||||
{RETROK_COMMA , 44, ","},
|
{RETROK_COMMA, ","},
|
||||||
{RETROK_MINUS , 45, "-"},
|
{RETROK_MINUS, "-"},
|
||||||
{RETROK_PERIOD , 46, "."},
|
{RETROK_PERIOD, "."},
|
||||||
{RETROK_SLASH , 47, "/"},
|
{RETROK_SLASH, "/"},
|
||||||
{RETROK_0 , 48, "0"},
|
{RETROK_0, "0"},
|
||||||
{RETROK_1 , 49, "1"},
|
{RETROK_1, "1"},
|
||||||
{RETROK_2 , 50, "2"},
|
{RETROK_2, "2"},
|
||||||
{RETROK_3 , 51, "3"},
|
{RETROK_3, "3"},
|
||||||
{RETROK_4 , 52, "4"},
|
{RETROK_4, "4"},
|
||||||
{RETROK_5 , 53, "5"},
|
{RETROK_5, "5"},
|
||||||
{RETROK_6 , 54, "6"},
|
{RETROK_6, "6"},
|
||||||
{RETROK_7 , 55, "7"},
|
{RETROK_7, "7"},
|
||||||
{RETROK_8 , 56, "8"},
|
{RETROK_8, "8"},
|
||||||
{RETROK_9 , 57, "9"},
|
{RETROK_9, "9"},
|
||||||
{RETROK_COLON , 58, ":"},
|
{RETROK_COLON, ":"},
|
||||||
{RETROK_SEMICOLON , 59, ";"},
|
{RETROK_SEMICOLON, ";"},
|
||||||
{RETROK_LESS , 60, "-"},
|
{RETROK_LESS, "-"},
|
||||||
{RETROK_EQUALS , 61, "="},
|
{RETROK_EQUALS, "="},
|
||||||
{RETROK_GREATER , 62, ">"},
|
{RETROK_GREATER, ">"},
|
||||||
{RETROK_QUESTION , 63, "?"},
|
{RETROK_QUESTION, "?"},
|
||||||
{RETROK_AT , 64, "@"},
|
{RETROK_AT, "@"},
|
||||||
{RETROK_LEFTBRACKET , 91, "["},
|
{RETROK_LEFTBRACKET, "["},
|
||||||
{RETROK_BACKSLASH , 92, "\\"},
|
{RETROK_BACKSLASH, "\\"},
|
||||||
{RETROK_RIGHTBRACKET , 93, "]"},
|
{RETROK_RIGHTBRACKET, "]"},
|
||||||
{RETROK_CARET , 94, "^"},
|
{RETROK_CARET, "^"},
|
||||||
{RETROK_UNDERSCORE , 95, "_"},
|
{RETROK_UNDERSCORE, "_"},
|
||||||
{RETROK_BACKQUOTE , 96, "`"},
|
{RETROK_BACKQUOTE, "`"},
|
||||||
{RETROK_a , 97, "a"},
|
{RETROK_a, "a"},
|
||||||
{RETROK_b , 98, "b"},
|
{RETROK_b, "b"},
|
||||||
{RETROK_c , 99, "c"},
|
{RETROK_c, "c"},
|
||||||
{RETROK_d , 100, "d"},
|
{RETROK_d, "d"},
|
||||||
{RETROK_e , 101, "e"},
|
{RETROK_e, "e"},
|
||||||
{RETROK_f , 102, "f"},
|
{RETROK_f, "f"},
|
||||||
{RETROK_g , 103, "g"},
|
{RETROK_g, "g"},
|
||||||
{RETROK_h , 104, "h"},
|
{RETROK_h, "h"},
|
||||||
{RETROK_i , 105, "i"},
|
{RETROK_i, "i"},
|
||||||
{RETROK_j , 106, "j"},
|
{RETROK_j, "j"},
|
||||||
{RETROK_k , 107, "k"},
|
{RETROK_k, "k"},
|
||||||
{RETROK_l , 108, "l"},
|
{RETROK_l, "l"},
|
||||||
{RETROK_m , 109, "m"},
|
{RETROK_m, "m"},
|
||||||
{RETROK_n , 110, "n"},
|
{RETROK_n, "n"},
|
||||||
{RETROK_o , 111, "o"},
|
{RETROK_o, "o"},
|
||||||
{RETROK_p , 112, "p"},
|
{RETROK_p, "p"},
|
||||||
{RETROK_q , 113, "q"},
|
{RETROK_q, "q"},
|
||||||
{RETROK_r , 114, "r"},
|
{RETROK_r, "r"},
|
||||||
{RETROK_s , 115, "s"},
|
{RETROK_s, "s"},
|
||||||
{RETROK_t , 116, "t"},
|
{RETROK_t, "t"},
|
||||||
{RETROK_u , 117, "u"},
|
{RETROK_u, "u"},
|
||||||
{RETROK_v , 118, "v"},
|
{RETROK_v, "v"},
|
||||||
{RETROK_w , 119, "w"},
|
{RETROK_w, "w"},
|
||||||
{RETROK_x , 120, "x"},
|
{RETROK_x, "x"},
|
||||||
{RETROK_y , 121, "y"},
|
{RETROK_y, "y"},
|
||||||
{RETROK_z , 122, "z"},
|
{RETROK_z, "z"},
|
||||||
{RETROK_DELETE , 127, "Delete"},
|
{RETROK_DELETE, "Delete"},
|
||||||
|
|
||||||
{RETROK_KP0 , 256, "Numpad 0"},
|
{RETROK_KP0, "Numpad 0"},
|
||||||
{RETROK_KP1 , 257, "Numpad 1"},
|
{RETROK_KP1, "Numpad 1"},
|
||||||
{RETROK_KP2 , 258, "Numpad 2"},
|
{RETROK_KP2, "Numpad 2"},
|
||||||
{RETROK_KP3 , 259, "Numpad 3"},
|
{RETROK_KP3, "Numpad 3"},
|
||||||
{RETROK_KP4 , 260, "Numpad 4"},
|
{RETROK_KP4, "Numpad 4"},
|
||||||
{RETROK_KP5 , 261, "Numpad 5"},
|
{RETROK_KP5, "Numpad 5"},
|
||||||
{RETROK_KP6 , 262, "Numpad 6"},
|
{RETROK_KP6, "Numpad 6"},
|
||||||
{RETROK_KP7 , 263, "Numpad 7"},
|
{RETROK_KP7, "Numpad 7"},
|
||||||
{RETROK_KP8 , 264, "Numpad 8"},
|
{RETROK_KP8, "Numpad 8"},
|
||||||
{RETROK_KP9 , 265, "Numpad 9"},
|
{RETROK_KP9, "Numpad 9"},
|
||||||
{RETROK_KP_PERIOD , 266, "Numpad ."},
|
{RETROK_KP_PERIOD, "Numpad ."},
|
||||||
{RETROK_KP_DIVIDE , 267, "Numpad /"},
|
{RETROK_KP_DIVIDE, "Numpad /"},
|
||||||
{RETROK_KP_MULTIPLY , 268, "Numpad *"},
|
{RETROK_KP_MULTIPLY, "Numpad *"},
|
||||||
{RETROK_KP_MINUS , 269, "Numpad -"},
|
{RETROK_KP_MINUS, "Numpad -"},
|
||||||
{RETROK_KP_PLUS , 270, "Numpad +"},
|
{RETROK_KP_PLUS, "Numpad +"},
|
||||||
{RETROK_KP_ENTER , 271, "Numpad Enter"},
|
{RETROK_KP_ENTER, "Numpad Enter"},
|
||||||
{RETROK_KP_EQUALS , 272, "Numpad ="},
|
{RETROK_KP_EQUALS, "Numpad ="},
|
||||||
|
|
||||||
{RETROK_UP , 273, "Up"},
|
{RETROK_UP, "Up"},
|
||||||
{RETROK_DOWN , 274, "Down"},
|
{RETROK_DOWN, "Down"},
|
||||||
{RETROK_RIGHT , 275, "Right"},
|
{RETROK_RIGHT, "Right"},
|
||||||
{RETROK_LEFT , 276, "Left"},
|
{RETROK_LEFT, "Left"},
|
||||||
{RETROK_INSERT , 277, "Insert"},
|
{RETROK_INSERT, "Insert"},
|
||||||
{RETROK_HOME , 278, "Home"},
|
{RETROK_HOME, "Home"},
|
||||||
{RETROK_END , 279, "End"},
|
{RETROK_END, "End"},
|
||||||
{RETROK_PAGEUP , 280, "Page Up"},
|
{RETROK_PAGEUP, "Page Up"},
|
||||||
{RETROK_PAGEDOWN , 281, "Page Down"},
|
{RETROK_PAGEDOWN, "Page Down"},
|
||||||
|
|
||||||
{RETROK_F1 , 282, "F1"},
|
{RETROK_F1, "F1"},
|
||||||
{RETROK_F2 , 283, "F2"},
|
{RETROK_F2, "F2"},
|
||||||
{RETROK_F3 , 284, "F3"},
|
{RETROK_F3, "F3"},
|
||||||
{RETROK_F4 , 285, "F4"},
|
{RETROK_F4, "F4"},
|
||||||
{RETROK_F5 , 286, "F5"},
|
{RETROK_F5, "F5"},
|
||||||
{RETROK_F6 , 287, "F6"},
|
{RETROK_F6, "F6"},
|
||||||
{RETROK_F7 , 288, "F7"},
|
{RETROK_F7, "F7"},
|
||||||
{RETROK_F8 , 289, "F8"},
|
{RETROK_F8, "F8"},
|
||||||
{RETROK_F9 , 290, "F9"},
|
{RETROK_F9, "F9"},
|
||||||
{RETROK_F10 , 291, "F10"},
|
{RETROK_F10, "F10"},
|
||||||
{RETROK_F11 , 292, "F11"},
|
{RETROK_F11, "F11"},
|
||||||
{RETROK_F12 , 293, "F12"},
|
{RETROK_F12, "F12"},
|
||||||
{RETROK_F13 , 294, "F13"},
|
{RETROK_F13, "F13"},
|
||||||
{RETROK_F14 , 295, "F14"},
|
{RETROK_F14, "F14"},
|
||||||
{RETROK_F15 , 296, "F15"},
|
{RETROK_F15, "F15"},
|
||||||
|
|
||||||
{RETROK_NUMLOCK , 300, "Num Lock"},
|
{RETROK_NUMLOCK, "Num Lock"},
|
||||||
{RETROK_CAPSLOCK , 301, "Caps Lock"},
|
{RETROK_CAPSLOCK, "Caps Lock"},
|
||||||
{RETROK_SCROLLOCK , 302, "Scroll Lock"},
|
{RETROK_SCROLLOCK, "Scroll Lock"},
|
||||||
{RETROK_RSHIFT , 303, "Right Shift"},
|
{RETROK_RSHIFT, "Right Shift"},
|
||||||
{RETROK_LSHIFT , 304, "Left Shift"},
|
{RETROK_LSHIFT, "Left Shift"},
|
||||||
{RETROK_RCTRL , 305, "Right Control"},
|
{RETROK_RCTRL, "Right Control"},
|
||||||
{RETROK_LCTRL , 306, "Left Control"},
|
{RETROK_LCTRL, "Left Control"},
|
||||||
{RETROK_RALT , 307, "Right Alt"},
|
{RETROK_RALT, "Right Alt"},
|
||||||
{RETROK_LALT , 308, "Left Alt"},
|
{RETROK_LALT, "Left Alt"},
|
||||||
{RETROK_RMETA , 309, "Right Meta"},
|
{RETROK_RMETA, "Right Meta"},
|
||||||
{RETROK_LMETA , 310, "Left Meta"},
|
{RETROK_LMETA, "Left Meta"},
|
||||||
{RETROK_LSUPER , 311, "Right Super"},
|
{RETROK_LSUPER, "Right Super"},
|
||||||
{RETROK_RSUPER , 312, "Left Super"},
|
{RETROK_RSUPER, "Left Super"},
|
||||||
{RETROK_MODE , 313, "Mode"},
|
{RETROK_MODE, "Mode"},
|
||||||
{RETROK_COMPOSE , 314, "Compose"},
|
{RETROK_COMPOSE, "Compose"},
|
||||||
|
|
||||||
{RETROK_HELP , 315, "Help"},
|
{RETROK_HELP, "Help"},
|
||||||
{RETROK_PRINT , 316, "Print"},
|
{RETROK_PRINT, "Print"},
|
||||||
{RETROK_SYSREQ , 317, "Sys Req"},
|
{RETROK_SYSREQ, "Sys Req"},
|
||||||
{RETROK_BREAK , 318, "Break"},
|
{RETROK_BREAK, "Break"},
|
||||||
{RETROK_MENU , 319, "Menu"},
|
{RETROK_MENU, "Menu"},
|
||||||
{RETROK_POWER , 320, "Power"},
|
{RETROK_POWER, "Power"},
|
||||||
{RETROK_EURO , 321, "€"},
|
{RETROK_EURO, "€"},
|
||||||
{RETROK_UNDO , 322, "Undo"}
|
{RETROK_UNDO, "Undo"}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This sets up all the callback functions for a menu entry.
|
/* This sets up all the callback functions for a menu entry.
|
||||||
|
@ -29,10 +29,9 @@ RETRO_BEGIN_DECLS
|
|||||||
|
|
||||||
typedef struct key_desc
|
typedef struct key_desc
|
||||||
{
|
{
|
||||||
/* key id */
|
|
||||||
unsigned id;
|
|
||||||
/* libretro key id */
|
/* libretro key id */
|
||||||
unsigned key;
|
unsigned key;
|
||||||
|
|
||||||
/* description */
|
/* description */
|
||||||
char desc[32];
|
char desc[32];
|
||||||
} key_desc_t;
|
} key_desc_t;
|
||||||
|
@ -207,7 +207,7 @@ enum menu_settings_type
|
|||||||
MENU_SETTINGS_INPUT_DESC_BEGIN,
|
MENU_SETTINGS_INPUT_DESC_BEGIN,
|
||||||
MENU_SETTINGS_INPUT_DESC_END = MENU_SETTINGS_INPUT_DESC_BEGIN + (MAX_USERS * (RARCH_FIRST_CUSTOM_BIND + 4)),
|
MENU_SETTINGS_INPUT_DESC_END = MENU_SETTINGS_INPUT_DESC_BEGIN + (MAX_USERS * (RARCH_FIRST_CUSTOM_BIND + 4)),
|
||||||
MENU_SETTINGS_INPUT_DESC_KBD_BEGIN,
|
MENU_SETTINGS_INPUT_DESC_KBD_BEGIN,
|
||||||
MENU_SETTINGS_INPUT_DESC_KBD_END = MENU_SETTINGS_INPUT_DESC_KBD_BEGIN + 191,
|
MENU_SETTINGS_INPUT_DESC_KBD_END = MENU_SETTINGS_INPUT_DESC_KBD_BEGIN + 136,
|
||||||
MENU_SETTINGS_LAST
|
MENU_SETTINGS_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user