mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
add GUI representation for the settings
This commit is contained in:
parent
ac1695e7fd
commit
7d8b13372d
@ -705,6 +705,7 @@ static const bool network_cmd_enable = false;
|
||||
static const uint16_t network_cmd_port = 55355;
|
||||
static const bool stdin_cmd_enable = false;
|
||||
|
||||
static const uint16_t network_remote_base_port = 55400;
|
||||
/* Number of entries that will be kept in content history playlist file. */
|
||||
static const unsigned default_content_history_size = 100;
|
||||
|
||||
|
@ -188,6 +188,10 @@ static const char *menu_hash_to_str_us_label(uint32_t hash)
|
||||
return "savestate_directory";
|
||||
case MENU_LABEL_STDIN_CMD_ENABLE:
|
||||
return "stdin_commands";
|
||||
case MENU_LABEL_NETWORK_REMOTE_ENABLE:
|
||||
return "network_remote_enable";
|
||||
case MENU_LABEL_NETWORK_REMOTE_PORT:
|
||||
return "network_remote_base_port";
|
||||
case MENU_LABEL_VIDEO_DRIVER:
|
||||
return "video_driver";
|
||||
case MENU_LABEL_RECORD_ENABLE:
|
||||
@ -902,6 +906,8 @@ const char *menu_hash_to_str_us(uint32_t hash)
|
||||
return "Savestate Dir";
|
||||
case MENU_LABEL_VALUE_STDIN_CMD_ENABLE:
|
||||
return "stdin Commands";
|
||||
case MENU_LABEL_VALUE_NETWORK_REMOTE_ENABLE:
|
||||
return "Network Gamepad";
|
||||
case MENU_LABEL_VALUE_VIDEO_DRIVER:
|
||||
return "Video Driver";
|
||||
case MENU_LABEL_VALUE_RECORD_ENABLE:
|
||||
|
@ -645,7 +645,11 @@ extern "C" {
|
||||
#define MENU_LABEL_NETWORK_CMD_PORT 0xc1b9e0a6U
|
||||
#define MENU_LABEL_VALUE_NETWORK_CMD_PORT 0xee5773f3U
|
||||
#define MENU_LABEL_STDIN_CMD_ENABLE 0x665069c0U
|
||||
#define MENU_LABEL_NETWORK_REMOTE_ENABLE 0x99cd4420U
|
||||
#define MENU_LABEL_NETWORK_REMOTE_PORT 0x9aef9e18U
|
||||
|
||||
#define MENU_LABEL_VALUE_STDIN_CMD_ENABLE 0xc98ecc46U
|
||||
#define MENU_LABEL_VALUE_NETWORK_REMOTE_ENABLE 0x32f1f6f1U
|
||||
#define MENU_LABEL_HISTORY_LIST_ENABLE 0xe1c2ae78U
|
||||
#define MENU_LABEL_VALUE_HISTORY_LIST_ENABLE 0xd2c13bbaU
|
||||
#define MENU_LABEL_CONTENT_HISTORY_SIZE 0x6f24c38bU
|
||||
|
@ -6252,7 +6252,7 @@ static bool setting_append_list_netplay_options(
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->network_cmd_port,
|
||||
@ -6264,8 +6264,61 @@ static bool setting_append_list_netplay_options(
|
||||
parent_group,
|
||||
NULL,
|
||||
NULL);
|
||||
menu_settings_list_current_add_range(list, list_info, 1, 99999, 1, true, true);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->network_remote_enable,
|
||||
menu_hash_to_str(MENU_LABEL_NETWORK_REMOTE_ENABLE),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_NETWORK_REMOTE_ENABLE),
|
||||
"", /* todo: add default */
|
||||
menu_hash_to_str(MENU_VALUE_OFF),
|
||||
menu_hash_to_str(MENU_VALUE_ON),
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->network_remote_base_port,
|
||||
menu_hash_to_str(MENU_LABEL_NETWORK_REMOTE_PORT),
|
||||
/* todo: localization */
|
||||
"Network Remote Base Port",
|
||||
network_remote_base_port,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
NULL,
|
||||
NULL);
|
||||
menu_settings_list_current_add_range(list, list_info, 1, 99999, 1, true, true);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
|
||||
for(int user = 0; user < settings->input.max_users; user++)
|
||||
{
|
||||
char s[64];
|
||||
snprintf(s, sizeof(s), "User %d Remote Enable", user + 1);
|
||||
RARCH_LOG("s %s\n",s);
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->network_remote_enable_user[user],
|
||||
/* todo: figure out this value, it's working fine but I don't think this is correct */
|
||||
menu_hash_to_str(MENU_LABEL_NETWORK_REMOTE_ENABLE) + user + 1,
|
||||
strdup(s),
|
||||
"", /* todo: add default */
|
||||
menu_hash_to_str(MENU_VALUE_OFF),
|
||||
menu_hash_to_str(MENU_VALUE_ON),
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ADVANCED);
|
||||
}
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->stdin_cmd_enable,
|
||||
|
Loading…
x
Reference in New Issue
Block a user