mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-14 04:41:34 +00:00
(Menu) Refactor netplay_tcp_udp_port setting with MENU_FILE_LINEFEED
This commit is contained in:
parent
5793042b7d
commit
780688ec92
@ -552,12 +552,12 @@ static void menu_common_setting_set_current_fraction(
|
||||
}
|
||||
|
||||
static void menu_common_setting_set_current_unsigned_integer(
|
||||
rarch_setting_t *setting, unsigned action)
|
||||
rarch_setting_t *setting, unsigned id, unsigned action)
|
||||
{
|
||||
if (!strcmp(setting->name, "netplay_tcp_udp_port"))
|
||||
if (id == MENU_FILE_LINEFEED)
|
||||
{
|
||||
if (action == MENU_ACTION_OK)
|
||||
menu_key_start_line(driver.menu, "TCP/UDP Port: ",
|
||||
menu_key_start_line(driver.menu, setting->short_description,
|
||||
setting->name, st_uint_callback);
|
||||
else if (action == MENU_ACTION_START)
|
||||
*setting->value.unsigned_integer =
|
||||
@ -641,7 +641,7 @@ static void handle_setting(rarch_setting_t *setting,
|
||||
if (setting->type == ST_BOOL)
|
||||
menu_common_setting_set_current_boolean(setting, action);
|
||||
else if (setting->type == ST_UINT)
|
||||
menu_common_setting_set_current_unsigned_integer(setting, action);
|
||||
menu_common_setting_set_current_unsigned_integer(setting, id, action);
|
||||
else if (setting->type == ST_FLOAT)
|
||||
menu_common_setting_set_current_fraction(setting, action);
|
||||
else if (setting->type == ST_DIR)
|
||||
|
@ -307,7 +307,7 @@ int menu_entries_push_list(menu_handle_t *menu,
|
||||
add_setting_entry(menu,list,"netplay_mode", 0, setting_data);
|
||||
add_setting_entry(menu,list,"netplay_spectator_mode_enable", 0, setting_data);
|
||||
add_setting_entry(menu,list,"netplay_ip_address", 0, setting_data);
|
||||
add_setting_entry(menu,list,"netplay_tcp_udp_port", 0, setting_data);
|
||||
add_setting_entry(menu,list,"netplay_tcp_udp_port", MENU_FILE_LINEFEED, setting_data);
|
||||
add_setting_entry(menu,list,"netplay_delay_frames", 0, setting_data);
|
||||
}
|
||||
else if (!strcmp(label, "core_counters"))
|
||||
|
Loading…
Reference in New Issue
Block a user