Move bind_mode_keyboard variable to menu_input

This commit is contained in:
twinaphex 2015-10-22 22:44:44 +02:00
parent 05e853c0f2
commit 9eb077088f
11 changed files with 5 additions and 27 deletions

View File

@ -89,8 +89,6 @@ const char *menu_hash_to_str_de(uint32_t hash)
return "RetroKeyboard";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Warte auf Audio-Frames";
case MENU_LABEL_VALUE_INPUT_BIND_MODE:
return "Eingabe-Bind-Modus";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "Zeige Autoconfig-Beschriftungen";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:

View File

@ -146,8 +146,6 @@ const char *menu_hash_to_str_es(uint32_t hash)
return "RetroKeyboard";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Bloquear fotogramas";
case MENU_LABEL_VALUE_INPUT_BIND_MODE:
return "Modo de asignación";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "Mostrar etiquetas de descripción del autoconfigurado";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:

View File

@ -102,8 +102,6 @@ const char *menu_hash_to_str_fr(uint32_t hash)
return "audio_block_frames";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Block Frames";
case MENU_LABEL_VALUE_INPUT_BIND_MODE:
return "Mode mappage";
case MENU_LABEL_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "autoconfig_descriptor_label_show";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:

View File

@ -135,8 +135,6 @@ const char *menu_hash_to_str_nl(uint32_t hash)
return "RetroKeyboard";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Block Frames";
case MENU_LABEL_VALUE_INPUT_BIND_MODE:
return "Bind Mode";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "Autoconfig Descriptie Labels Weergeven";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:

View File

@ -99,8 +99,6 @@ const char *menu_hash_to_str_pl(uint32_t hash)
return "RetroKeyboard";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Block Frames";
case MENU_LABEL_VALUE_INPUT_BIND_MODE:
return "Tryb bindowania";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "Wy¶wietl opisy przycisków autokonfiguracji";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:

View File

@ -89,8 +89,6 @@ const char *menu_hash_to_str_pt(uint32_t hash)
return "RetroTeclado";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Quadros de Blocos de Áudio";
case MENU_LABEL_VALUE_INPUT_BIND_MODE:
return "Modo de Associações";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "Mostrar Rótulos de Autoconfiguração";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:

View File

@ -114,8 +114,6 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
return "system_bgm_enable";
case MENU_LABEL_AUDIO_BLOCK_FRAMES:
return "audio_block_frames";
case MENU_LABEL_INPUT_BIND_MODE:
return "input_bind_mode";
case MENU_LABEL_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "autoconfig_descriptor_label_show";
case MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW:
@ -794,8 +792,6 @@ const char *menu_hash_to_str_us(uint32_t hash)
return "RetroKeyboard";
case MENU_LABEL_VALUE_AUDIO_BLOCK_FRAMES:
return "Block Frames";
case MENU_LABEL_VALUE_INPUT_BIND_MODE:
return "Bind Mode";
case MENU_LABEL_VALUE_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "Display Autoconfig Descriptor Labels";
case MENU_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW:

View File

@ -97,8 +97,6 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
return "system_bgm_enable";
case MENU_LABEL_AUDIO_BLOCK_FRAMES:
return "audio_block_frames";
case MENU_LABEL_INPUT_BIND_MODE:
return "input_bind_mode";
case MENU_LABEL_AUTOCONFIG_DESCRIPTOR_LABEL_SHOW:
return "autoconfig_descriptor_label_show";
case MENU_LABEL_INPUT_DESCRIPTOR_LABEL_SHOW:

View File

@ -600,9 +600,6 @@ extern "C" {
#define MENU_LABEL_INPUT_DESCRIPTOR_HIDE_UNBOUND 0x7051d870U
#define MENU_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND 0xc26ddec5U
#define MENU_LABEL_INPUT_BIND_MODE 0x90281b55U
#define MENU_LABEL_VALUE_INPUT_BIND_MODE 0xe06b25c7U
#define MENU_LABEL_NETWORK_CMD_ENABLE 0xfdf03a08U
#define MENU_LABEL_VALUE_NETWORK_CMD_ENABLE 0xb822b7a1U
#define MENU_LABEL_NETWORK_CMD_PORT 0xc1b9e0a6U

View File

@ -79,6 +79,8 @@ typedef struct menu_input
{
struct menu_bind_state binds;
bool bind_mode_keyboard;
uint64_t devices_mask;
struct
@ -670,7 +672,6 @@ int menu_input_key_bind_set_mode(void *data,
menu_input_t *menu_input = menu_input_get_ptr();
rarch_setting_t *setting = (rarch_setting_t*)data;
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
bool joypad_pressed = BIT64_GET(menu_input->devices_mask, settings->menu_ok_btn);
if (!setting)
@ -689,11 +690,11 @@ int menu_input_key_bind_set_mode(void *data,
menu_input_key_bind_set_timeout();
global->menu.bind_mode_keyboard = false;
menu_input->bind_mode_keyboard = false;
return 0;
}
global->menu.bind_mode_keyboard = true;
menu_input->bind_mode_keyboard = true;
menu_input_key_bind_set_timeout();
input_keyboard_wait_keys(menu,
@ -742,8 +743,7 @@ int menu_input_key_bind_iterate(char *s, size_t len)
bool timed_out = false;
menu_input_t *menu_input = menu_input_get_ptr();
driver_t *driver = driver_get_ptr();
global_t *global = global_get_ptr();
bool bind_mode_kb = global ? global->menu.bind_mode_keyboard : false;
bool bind_mode_kb = menu_input->bind_mode_keyboard;
int64_t current = retro_get_time_usec();
int timeout = (menu_input->binds.timeout_end - current) / 1000000;

View File

@ -171,7 +171,6 @@ typedef struct global
struct
{
struct retro_system_info info;
bool bind_mode_keyboard;
} menu;
#endif