mirror of
https://github.com/libretro/RetroArch
synced 2025-02-19 12:41:00 +00:00
Rename menu_input.c functions so that they are all in menu_input_*
namespace
This commit is contained in:
parent
5dea7263e5
commit
9a39abfbf0
@ -166,8 +166,8 @@ static int action_ok_load_state(const char *path,
|
||||
static int action_ok_cheat(const char *path,
|
||||
const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
menu_key_start_line(driver.menu, "Input Cheat",
|
||||
label, type, idx, st_cheat_callback);
|
||||
menu_input_key_start_line(driver.menu, "Input Cheat",
|
||||
label, type, idx, menu_input_st_cheat_callback);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -384,8 +384,8 @@ static int action_ok_shader_preset_save_as(const char *path,
|
||||
if (!driver.menu)
|
||||
return -1;
|
||||
|
||||
menu_key_start_line(driver.menu, "Preset Filename",
|
||||
label, type, idx, st_string_callback);
|
||||
menu_input_key_start_line(driver.menu, "Preset Filename",
|
||||
label, type, idx, menu_input_st_string_callback);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "../settings_data.h"
|
||||
#include "../input/input_joypad.h"
|
||||
|
||||
void menu_key_start_line(void *data, const char *label,
|
||||
void menu_input_key_start_line(void *data, const char *label,
|
||||
const char *label_setting, unsigned type, unsigned idx,
|
||||
input_keyboard_line_complete_t cb)
|
||||
{
|
||||
@ -49,7 +49,7 @@ void menu_key_start_line(void *data, const char *label,
|
||||
menu->keyboard.buffer = input_keyboard_start_line(menu, cb);
|
||||
}
|
||||
|
||||
static void menu_key_end_line(void *data)
|
||||
static void menu_input_key_end_line(void *data)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
@ -64,7 +64,7 @@ static void menu_key_end_line(void *data)
|
||||
driver.flushing_input = true;
|
||||
}
|
||||
|
||||
static void menu_search_callback(void *userdata, const char *str)
|
||||
static void menu_input_search_callback(void *userdata, const char *str)
|
||||
{
|
||||
size_t idx;
|
||||
menu_handle_t *menu = (menu_handle_t*)userdata;
|
||||
@ -72,10 +72,10 @@ static void menu_search_callback(void *userdata, const char *str)
|
||||
if (str && *str && file_list_search(menu->menu_list->selection_buf, str, &idx))
|
||||
menu_navigation_set(menu, idx, true);
|
||||
|
||||
menu_key_end_line(menu);
|
||||
menu_input_key_end_line(menu);
|
||||
}
|
||||
|
||||
void st_uint_callback(void *userdata, const char *str)
|
||||
void menu_input_st_uint_callback(void *userdata, const char *str)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)userdata;
|
||||
rarch_setting_t *current_setting = NULL;
|
||||
@ -87,10 +87,10 @@ void st_uint_callback(void *userdata, const char *str)
|
||||
menu->list_settings, menu->keyboard.label_setting)))
|
||||
*current_setting->value.unsigned_integer = strtoul(str, NULL, 0);
|
||||
}
|
||||
menu_key_end_line(menu);
|
||||
menu_input_key_end_line(menu);
|
||||
}
|
||||
|
||||
void st_string_callback(void *userdata, const char *str)
|
||||
void menu_input_st_string_callback(void *userdata, const char *str)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)userdata;
|
||||
rarch_setting_t *current_setting = NULL;
|
||||
@ -107,10 +107,11 @@ void st_string_callback(void *userdata, const char *str)
|
||||
menu_shader_manager_save_preset(str, false);
|
||||
}
|
||||
}
|
||||
menu_key_end_line(menu);
|
||||
|
||||
menu_input_key_end_line(menu);
|
||||
}
|
||||
|
||||
void st_cheat_callback(void *userdata, const char *str)
|
||||
void menu_input_st_cheat_callback(void *userdata, const char *str)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)userdata;
|
||||
cheat_manager_t *cheat = g_extern.cheat;
|
||||
@ -123,10 +124,11 @@ void st_cheat_callback(void *userdata, const char *str)
|
||||
cheat->cheats[cheat_index].code = strdup(str);
|
||||
cheat->cheats[cheat_index].state = true;
|
||||
}
|
||||
menu_key_end_line(menu);
|
||||
|
||||
menu_input_key_end_line(menu);
|
||||
}
|
||||
|
||||
void menu_key_event(bool down, unsigned keycode,
|
||||
void menu_input_key_event(bool down, unsigned keycode,
|
||||
uint32_t character, uint16_t mod)
|
||||
{
|
||||
if (!driver.menu)
|
||||
@ -141,11 +143,11 @@ void menu_key_event(bool down, unsigned keycode,
|
||||
driver.menu->keyboard.display = true;
|
||||
driver.menu->keyboard.label = "Search: ";
|
||||
driver.menu->keyboard.buffer =
|
||||
input_keyboard_start_line(driver.menu, menu_search_callback);
|
||||
input_keyboard_start_line(driver.menu, menu_input_search_callback);
|
||||
}
|
||||
}
|
||||
|
||||
void menu_poll_bind_state(struct menu_bind_state *state)
|
||||
void menu_input_poll_bind_state(struct menu_bind_state *state)
|
||||
{
|
||||
unsigned i, b, a, h;
|
||||
const rarch_joypad_driver_t *joypad = NULL;
|
||||
@ -191,7 +193,7 @@ void menu_poll_bind_state(struct menu_bind_state *state)
|
||||
}
|
||||
}
|
||||
|
||||
void menu_poll_bind_get_rested_axes(struct menu_bind_state *state)
|
||||
void menu_input_poll_bind_get_rested_axes(struct menu_bind_state *state)
|
||||
{
|
||||
unsigned i, a;
|
||||
const rarch_joypad_driver_t *joypad = NULL;
|
||||
@ -214,7 +216,7 @@ void menu_poll_bind_get_rested_axes(struct menu_bind_state *state)
|
||||
input_joypad_axis_raw(joypad, i, a);
|
||||
}
|
||||
|
||||
static bool menu_poll_find_trigger_pad(struct menu_bind_state *state,
|
||||
static bool menu_input_poll_find_trigger_pad(struct menu_bind_state *state,
|
||||
struct menu_bind_state *new_state, unsigned p)
|
||||
{
|
||||
unsigned a, b, h;
|
||||
@ -286,7 +288,7 @@ static bool menu_poll_find_trigger_pad(struct menu_bind_state *state,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool menu_poll_find_trigger(struct menu_bind_state *state,
|
||||
bool menu_input_poll_find_trigger(struct menu_bind_state *state,
|
||||
struct menu_bind_state *new_state)
|
||||
{
|
||||
unsigned i;
|
||||
@ -296,7 +298,7 @@ bool menu_poll_find_trigger(struct menu_bind_state *state,
|
||||
|
||||
for (i = 0; i < g_settings.input.max_users; i++)
|
||||
{
|
||||
if (!menu_poll_find_trigger_pad(state, new_state, i))
|
||||
if (!menu_input_poll_find_trigger_pad(state, new_state, i))
|
||||
continue;
|
||||
|
||||
/* Update the joypad mapping automatically.
|
||||
@ -307,7 +309,7 @@ bool menu_poll_find_trigger(struct menu_bind_state *state,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool menu_custom_bind_keyboard_cb(void *data, unsigned code)
|
||||
bool menu_input_custom_bind_keyboard_cb(void *data, unsigned code)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
|
||||
@ -342,10 +344,10 @@ int menu_input_bind_iterate(void *data)
|
||||
driver.menu_ctx->render_messagebox(msg);
|
||||
|
||||
driver.block_input = true;
|
||||
menu_poll_bind_state(&binds);
|
||||
menu_input_poll_bind_state(&binds);
|
||||
|
||||
if ((binds.skip && !menu->binds.skip) ||
|
||||
menu_poll_find_trigger(&menu->binds, &binds))
|
||||
menu_input_poll_find_trigger(&menu->binds, &binds))
|
||||
{
|
||||
driver.block_input = false;
|
||||
|
||||
|
@ -24,27 +24,27 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void menu_key_event(bool down, unsigned keycode, uint32_t character,
|
||||
void menu_input_key_event(bool down, unsigned keycode, uint32_t character,
|
||||
uint16_t key_modifiers);
|
||||
|
||||
void menu_key_start_line(void *data, const char *label,
|
||||
void menu_input_key_start_line(void *data, const char *label,
|
||||
const char *label_setting, unsigned type, unsigned idx,
|
||||
input_keyboard_line_complete_t cb);
|
||||
|
||||
void st_uint_callback(void *userdata, const char *str);
|
||||
void menu_input_st_uint_callback(void *userdata, const char *str);
|
||||
|
||||
void st_string_callback(void *userdata, const char *str);
|
||||
void menu_input_st_string_callback(void *userdata, const char *str);
|
||||
|
||||
void st_cheat_callback(void *userdata, const char *str);
|
||||
void menu_input_st_cheat_callback(void *userdata, const char *str);
|
||||
|
||||
void menu_poll_bind_get_rested_axes(struct menu_bind_state *state);
|
||||
void menu_input_poll_bind_get_rested_axes(struct menu_bind_state *state);
|
||||
|
||||
void menu_poll_bind_state(struct menu_bind_state *state);
|
||||
void menu_input_poll_bind_state(struct menu_bind_state *state);
|
||||
|
||||
bool menu_poll_find_trigger(struct menu_bind_state *state,
|
||||
bool menu_input_poll_find_trigger(struct menu_bind_state *state,
|
||||
struct menu_bind_state *new_state);
|
||||
|
||||
bool menu_custom_bind_keyboard_cb(void *data, unsigned code);
|
||||
bool menu_input_custom_bind_keyboard_cb(void *data, unsigned code);
|
||||
|
||||
int menu_input_bind_iterate(void *data);
|
||||
|
||||
|
@ -2180,7 +2180,7 @@ void rarch_main_set_state(unsigned cmd)
|
||||
* We'll use this later for something ...
|
||||
* FIXME: This should probably be moved to menu_common somehow. */
|
||||
g_extern.frontend_key_event = g_extern.system.key_event;
|
||||
g_extern.system.key_event = menu_key_event;
|
||||
g_extern.system.key_event = menu_input_key_event;
|
||||
|
||||
driver.menu->need_refresh = true;
|
||||
g_extern.system.frame_time_last = 0;
|
||||
|
@ -927,12 +927,12 @@ static int setting_data_action_ok_bind_all(void *data, unsigned action)
|
||||
rarch_get_time_usec() +
|
||||
MENU_KEYBOARD_BIND_TIMEOUT_SECONDS * 1000000;
|
||||
input_keyboard_wait_keys(driver.menu,
|
||||
menu_custom_bind_keyboard_cb);
|
||||
menu_input_custom_bind_keyboard_cb);
|
||||
}
|
||||
else
|
||||
{
|
||||
menu_poll_bind_get_rested_axes(&driver.menu->binds);
|
||||
menu_poll_bind_state(&driver.menu->binds);
|
||||
menu_input_poll_bind_get_rested_axes(&driver.menu->binds);
|
||||
menu_input_poll_bind_state(&driver.menu->binds);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1067,8 +1067,8 @@ static int setting_data_uint_action_ok_linefeed(void *data, unsigned action)
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
menu_key_start_line(driver.menu, setting->short_description,
|
||||
setting->name, 0, 0, st_uint_callback);
|
||||
menu_input_key_start_line(driver.menu, setting->short_description,
|
||||
setting->name, 0, 0, menu_input_st_uint_callback);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1119,12 +1119,12 @@ static int setting_data_bind_action_ok(void *data, unsigned action)
|
||||
driver.menu->binds.timeout_end = rarch_get_time_usec() +
|
||||
MENU_KEYBOARD_BIND_TIMEOUT_SECONDS * 1000000;
|
||||
input_keyboard_wait_keys(driver.menu,
|
||||
menu_custom_bind_keyboard_cb);
|
||||
menu_input_custom_bind_keyboard_cb);
|
||||
}
|
||||
else
|
||||
{
|
||||
menu_poll_bind_get_rested_axes(&driver.menu->binds);
|
||||
menu_poll_bind_state(&driver.menu->binds);
|
||||
menu_input_poll_bind_get_rested_axes(&driver.menu->binds);
|
||||
menu_input_poll_bind_state(&driver.menu->binds);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -1138,8 +1138,8 @@ static int setting_data_string_action_ok_allow_input(void *data,
|
||||
if (!setting || !driver.menu)
|
||||
return -1;
|
||||
|
||||
menu_key_start_line(driver.menu, setting->short_description,
|
||||
setting->name, 0, 0, st_string_callback);
|
||||
menu_input_key_start_line(driver.menu, setting->short_description,
|
||||
setting->name, 0, 0, menu_input_st_string_callback);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user