mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 13:20:43 +00:00
Cleanups
This commit is contained in:
parent
4cbc8e6f27
commit
121675c8e4
@ -1465,6 +1465,20 @@ static int action_ok_cheevos(const char *path,
|
|||||||
MENU_DIALOG_HELP_CHEEVOS_DESCRIPTION);
|
MENU_DIALOG_HELP_CHEEVOS_DESCRIPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void menu_input_st_cheat_cb(void *userdata, const char *str)
|
||||||
|
{
|
||||||
|
(void)userdata;
|
||||||
|
|
||||||
|
if (str && *str)
|
||||||
|
{
|
||||||
|
unsigned cheat_index = menu_input_dialog_get_kb_type()
|
||||||
|
- MENU_SETTINGS_CHEAT_BEGIN;
|
||||||
|
cheat_manager_set_code(cheat_index, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
menu_input_dialog_end();
|
||||||
|
}
|
||||||
|
|
||||||
static int action_ok_cheat(const char *path,
|
static int action_ok_cheat(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
|
@ -91,53 +91,6 @@ static menu_input_t *menu_input_get_ptr(void)
|
|||||||
return &menu_input_state;
|
return &menu_input_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_input_st_uint_cb(void *userdata, const char *str)
|
|
||||||
{
|
|
||||||
if (str && *str)
|
|
||||||
{
|
|
||||||
const char *label = menu_input_dialog_get_label_buffer();
|
|
||||||
rarch_setting_t *setting = menu_setting_find(label);
|
|
||||||
|
|
||||||
setting_set_with_string_representation(setting, str);
|
|
||||||
}
|
|
||||||
|
|
||||||
menu_input_dialog_end();
|
|
||||||
}
|
|
||||||
|
|
||||||
void menu_input_st_hex_cb(void *userdata, const char *str)
|
|
||||||
{
|
|
||||||
if (str && *str)
|
|
||||||
{
|
|
||||||
const char *label = menu_input_dialog_get_label_buffer();
|
|
||||||
rarch_setting_t *setting = menu_setting_find(label);
|
|
||||||
|
|
||||||
if (setting)
|
|
||||||
{
|
|
||||||
unsigned *ptr = (unsigned*)setting_get_ptr(setting);
|
|
||||||
if (str[0] == '#')
|
|
||||||
str++;
|
|
||||||
if (ptr)
|
|
||||||
*ptr = strtoul(str, NULL, 16);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
menu_input_dialog_end();
|
|
||||||
}
|
|
||||||
|
|
||||||
void menu_input_st_cheat_cb(void *userdata, const char *str)
|
|
||||||
{
|
|
||||||
(void)userdata;
|
|
||||||
|
|
||||||
if (str && *str)
|
|
||||||
{
|
|
||||||
unsigned cheat_index = menu_input_dialog_get_kb_type()
|
|
||||||
- MENU_SETTINGS_CHEAT_BEGIN;
|
|
||||||
cheat_manager_set_code(cheat_index, str);
|
|
||||||
}
|
|
||||||
|
|
||||||
menu_input_dialog_end();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool menu_input_mouse_check_vector_inside_hitbox(menu_input_ctx_hitbox_t *hitbox)
|
bool menu_input_mouse_check_vector_inside_hitbox(menu_input_ctx_hitbox_t *hitbox)
|
||||||
{
|
{
|
||||||
int16_t mouse_x = menu_input_mouse_state(MENU_MOUSE_X_AXIS);
|
int16_t mouse_x = menu_input_mouse_state(MENU_MOUSE_X_AXIS);
|
||||||
|
@ -87,12 +87,6 @@ typedef struct menu_input_ctx_hitbox
|
|||||||
int32_t y2;
|
int32_t y2;
|
||||||
} menu_input_ctx_hitbox_t;
|
} menu_input_ctx_hitbox_t;
|
||||||
|
|
||||||
|
|
||||||
/* Keyboard input callbacks */
|
|
||||||
void menu_input_st_uint_cb (void *userdata, const char *str);
|
|
||||||
void menu_input_st_hex_cb (void *userdata, const char *str);
|
|
||||||
void menu_input_st_cheat_cb (void *userdata, const char *str);
|
|
||||||
|
|
||||||
unsigned menu_input_frame_retropad(retro_input_t input, retro_input_t trigger_state);
|
unsigned menu_input_frame_retropad(retro_input_t input, retro_input_t trigger_state);
|
||||||
|
|
||||||
void menu_input_post_iterate(int *ret, unsigned action);
|
void menu_input_post_iterate(int *ret, unsigned action);
|
||||||
|
@ -1790,6 +1790,39 @@ static void menu_input_st_string_cb(void *userdata, const char *str)
|
|||||||
menu_input_dialog_end();
|
menu_input_dialog_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void menu_input_st_uint_cb(void *userdata, const char *str)
|
||||||
|
{
|
||||||
|
if (str && *str)
|
||||||
|
{
|
||||||
|
const char *label = menu_input_dialog_get_label_buffer();
|
||||||
|
rarch_setting_t *setting = menu_setting_find(label);
|
||||||
|
|
||||||
|
setting_set_with_string_representation(setting, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
menu_input_dialog_end();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void menu_input_st_hex_cb(void *userdata, const char *str)
|
||||||
|
{
|
||||||
|
if (str && *str)
|
||||||
|
{
|
||||||
|
const char *label = menu_input_dialog_get_label_buffer();
|
||||||
|
rarch_setting_t *setting = menu_setting_find(label);
|
||||||
|
|
||||||
|
if (setting)
|
||||||
|
{
|
||||||
|
unsigned *ptr = (unsigned*)setting_get_ptr(setting);
|
||||||
|
if (str[0] == '#')
|
||||||
|
str++;
|
||||||
|
if (ptr)
|
||||||
|
*ptr = strtoul(str, NULL, 16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
menu_input_dialog_end();
|
||||||
|
}
|
||||||
|
|
||||||
static int setting_generic_action_ok_linefeed(void *data, bool wraparound)
|
static int setting_generic_action_ok_linefeed(void *data, bool wraparound)
|
||||||
{
|
{
|
||||||
menu_input_ctx_line_t line;
|
menu_input_ctx_line_t line;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user