mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
Refactor away menu_action_setting_set_current_string_based_on_label
This commit is contained in:
parent
576a362032
commit
17dde1c5cc
@ -52,16 +52,6 @@ int setting_handler(
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int menu_action_set_current_string_based_on_label(
|
||||
const char *label, const char *str)
|
||||
{
|
||||
if (!strcmp(label, "video_shader_preset_save_as"))
|
||||
menu_shader_manager_save_preset(str, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int menu_entries_action_ok_set_current_path_selection(
|
||||
rarch_setting_t *setting, const char *path,
|
||||
const char *label, unsigned type,
|
||||
|
@ -26,9 +26,6 @@ extern "C" {
|
||||
int setting_handler(
|
||||
rarch_setting_t *setting, unsigned action);
|
||||
|
||||
int menu_action_set_current_string_based_on_label(
|
||||
const char *label, const char *str);
|
||||
|
||||
int menu_action_setting_set_current_string(
|
||||
rarch_setting_t *setting, const char *str);
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <ctype.h>
|
||||
#include "menu_common.h"
|
||||
#include "menu_action.h"
|
||||
#include "menu_shader.h"
|
||||
#include "../input/keyboard_line.h"
|
||||
#include "menu_input_line_cb.h"
|
||||
#include "../performance.h"
|
||||
@ -98,8 +99,10 @@ void st_string_callback(void *userdata, const char *str)
|
||||
menu->list_settings, menu->keyboard.label_setting)))
|
||||
menu_action_setting_set_current_string(current_setting, str);
|
||||
else
|
||||
menu_action_set_current_string_based_on_label(
|
||||
menu->keyboard.label_setting, str);
|
||||
{
|
||||
if (!strcmp(menu->keyboard.label, "video_shader_preset_save_as"))
|
||||
menu_shader_manager_save_preset(str, false);
|
||||
}
|
||||
}
|
||||
menu_key_end_line(menu);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user