mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
(Menu) Add MENU_FILE_LINEFEED
This commit is contained in:
parent
fcf121d631
commit
5793042b7d
@ -636,7 +636,7 @@ static void handle_driver(const char *label, char *driver,
|
||||
}
|
||||
|
||||
static void handle_setting(rarch_setting_t *setting,
|
||||
unsigned id, unsigned action)
|
||||
unsigned id, const char *label, unsigned action)
|
||||
{
|
||||
if (setting->type == ST_BOOL)
|
||||
menu_common_setting_set_current_boolean(setting, action);
|
||||
@ -659,33 +659,15 @@ static void handle_setting(rarch_setting_t *setting,
|
||||
setting->default_value.string, setting->name, id, action);
|
||||
else if (setting->type == ST_STRING)
|
||||
{
|
||||
if (!strcmp(setting->name, "audio_device"))
|
||||
if (id == MENU_FILE_LINEFEED)
|
||||
{
|
||||
if (action == MENU_ACTION_OK)
|
||||
menu_key_start_line(driver.menu, "Audio Device Name / IP: ",
|
||||
"audio_device", st_string_callback);
|
||||
menu_key_start_line(driver.menu, setting->short_description,
|
||||
setting->name, st_string_callback);
|
||||
else if (action == MENU_ACTION_START)
|
||||
*setting->value.string = '\0';
|
||||
}
|
||||
else if (!strcmp(setting->name, "netplay_nickname"))
|
||||
{
|
||||
if (action == MENU_ACTION_OK)
|
||||
menu_key_start_line(driver.menu, "Username: ",
|
||||
"netplay_nickname", st_string_callback);
|
||||
else if (action == MENU_ACTION_START)
|
||||
*setting->value.string = '\0';
|
||||
}
|
||||
#ifdef HAVE_NETPLAY
|
||||
else if (!strcmp(setting->name, "netplay_ip_address"))
|
||||
{
|
||||
if (action == MENU_ACTION_OK)
|
||||
menu_key_start_line(driver.menu, "IP Address: ",
|
||||
"netplay_ip_address", st_string_callback);
|
||||
else if (action == MENU_ACTION_START)
|
||||
*setting->value.string = '\0';
|
||||
}
|
||||
#endif
|
||||
if (!strcmp(setting->name, "video_driver"))
|
||||
else if (!strcmp(setting->name, "video_driver"))
|
||||
handle_driver(setting->name, g_settings.video.driver,
|
||||
sizeof(g_settings.video.driver), action);
|
||||
else if (!strcmp(setting->name, "audio_driver"))
|
||||
@ -723,7 +705,7 @@ static int menu_setting_set(unsigned id, const char *label,
|
||||
);
|
||||
|
||||
if (setting)
|
||||
handle_setting(setting, id, action);
|
||||
handle_setting(setting, id, label, action);
|
||||
else
|
||||
{
|
||||
setting = (rarch_setting_t*)get_last_setting(
|
||||
@ -757,7 +739,7 @@ static int menu_setting_set(unsigned id, const char *label,
|
||||
}
|
||||
}
|
||||
|
||||
handle_setting(setting, id, action);
|
||||
handle_setting(setting, id, label, action);
|
||||
}
|
||||
else if (!strcmp(label, "video_shader_num_passes"))
|
||||
{
|
||||
|
@ -60,6 +60,7 @@ typedef enum
|
||||
MENU_FILE_PLAIN,
|
||||
MENU_FILE_DIRECTORY,
|
||||
MENU_FILE_DEVICE,
|
||||
MENU_FILE_LINEFEED,
|
||||
MENU_FILE_CORE,
|
||||
MENU_FILE_PLAYLIST_ENTRY,
|
||||
MENU_FILE_USE_DIRECTORY,
|
||||
|
@ -297,8 +297,8 @@ int menu_entries_push_list(menu_handle_t *menu,
|
||||
else if (!strcmp(label, "User Options"))
|
||||
{
|
||||
file_list_clear(list);
|
||||
add_setting_entry(menu,list,"netplay_nickname", 0, setting_data);
|
||||
add_setting_entry(menu,list,"user_language", 0, setting_data);
|
||||
add_setting_entry(menu,list,"netplay_nickname", MENU_FILE_LINEFEED, setting_data);
|
||||
add_setting_entry(menu,list,"user_language", MENU_FILE_LINEFEED, setting_data);
|
||||
}
|
||||
else if (!strcmp(label, "Netplay Options"))
|
||||
{
|
||||
@ -362,7 +362,7 @@ int menu_entries_push_list(menu_handle_t *menu,
|
||||
add_setting_entry(menu,list,"audio_rate_control_delta", 0, setting_data);
|
||||
add_setting_entry(menu,list,"system_bgm_enable", 0, setting_data);
|
||||
add_setting_entry(menu,list,"audio_volume", 0, setting_data);
|
||||
add_setting_entry(menu,list,"audio_device", 0, setting_data);
|
||||
add_setting_entry(menu,list,"audio_device", MENU_FILE_LINEFEED, setting_data);
|
||||
}
|
||||
else if (!strcmp(label, "Input Options"))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user