Silence warnings/errors
This commit is contained in:
parent
0c741e6f61
commit
472a792d88
55
command.c
55
command.c
|
@ -124,8 +124,10 @@ struct command
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef HAVE_CHEEVOS
|
||||||
static bool command_read_ram(const char *arg);
|
static bool command_read_ram(const char *arg);
|
||||||
static bool command_write_ram(const char *arg);
|
static bool command_write_ram(const char *arg);
|
||||||
|
#endif
|
||||||
|
|
||||||
static const struct cmd_action_map action_map[] = {
|
static const struct cmd_action_map action_map[] = {
|
||||||
{ "SET_SHADER", command_set_shader, "<shader path>" },
|
{ "SET_SHADER", command_set_shader, "<shader path>" },
|
||||||
|
@ -247,9 +249,9 @@ bool command_set_shader(const char *arg)
|
||||||
return video_driver_set_shader(type, arg);
|
return video_driver_set_shader(type, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||||
static bool command_read_ram(const char *arg)
|
static bool command_read_ram(const char *arg)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
|
||||||
cheevos_var_t var;
|
cheevos_var_t var;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
unsigned nbytes;
|
unsigned nbytes;
|
||||||
|
@ -283,14 +285,10 @@ static bool command_read_ram(const char *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool command_write_ram(const char *arg)
|
static bool command_write_ram(const char *arg)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
|
||||||
int i;
|
int i;
|
||||||
cheevos_var_t var;
|
cheevos_var_t var;
|
||||||
unsigned nbytes = 0;
|
unsigned nbytes = 0;
|
||||||
|
@ -311,10 +309,9 @@ static bool command_write_ram(const char *arg)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool command_get_arg(const char *tok,
|
static bool command_get_arg(const char *tok,
|
||||||
const char **arg, unsigned *index)
|
const char **arg, unsigned *index)
|
||||||
|
@ -357,28 +354,6 @@ static bool command_get_arg(const char *tok,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void command_parse_sub_msg(command_t *handle, const char *tok)
|
|
||||||
{
|
|
||||||
const char *arg = NULL;
|
|
||||||
unsigned index = 0;
|
|
||||||
|
|
||||||
if (command_get_arg(tok, &arg, &index))
|
|
||||||
{
|
|
||||||
if (arg)
|
|
||||||
{
|
|
||||||
if (!action_map[index].action(arg))
|
|
||||||
RARCH_ERR("Command \"%s\" failed.\n", arg);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
handle->state[map[index].id] = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
RARCH_WARN("%s \"%s\" %s.\n",
|
|
||||||
msg_hash_to_str(MSG_UNRECOGNIZED_COMMAND),
|
|
||||||
tok,
|
|
||||||
msg_hash_to_str(MSG_RECEIVED));
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) && defined(HAVE_COMMAND)
|
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) && defined(HAVE_COMMAND)
|
||||||
static bool command_network_init(command_t *handle, uint16_t port)
|
static bool command_network_init(command_t *handle, uint16_t port)
|
||||||
{
|
{
|
||||||
|
@ -434,6 +409,28 @@ static bool command_verify(const char *cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_COMMAND
|
#ifdef HAVE_COMMAND
|
||||||
|
static void command_parse_sub_msg(command_t *handle, const char *tok)
|
||||||
|
{
|
||||||
|
const char *arg = NULL;
|
||||||
|
unsigned index = 0;
|
||||||
|
|
||||||
|
if (command_get_arg(tok, &arg, &index))
|
||||||
|
{
|
||||||
|
if (arg)
|
||||||
|
{
|
||||||
|
if (!action_map[index].action(arg))
|
||||||
|
RARCH_ERR("Command \"%s\" failed.\n", arg);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
handle->state[map[index].id] = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
RARCH_WARN("%s \"%s\" %s.\n",
|
||||||
|
msg_hash_to_str(MSG_UNRECOGNIZED_COMMAND),
|
||||||
|
tok,
|
||||||
|
msg_hash_to_str(MSG_RECEIVED));
|
||||||
|
}
|
||||||
|
|
||||||
static void command_parse_msg(command_t *handle, char *buf, enum cmd_source_t source)
|
static void command_parse_msg(command_t *handle, char *buf, enum cmd_source_t source)
|
||||||
{
|
{
|
||||||
char *save = NULL;
|
char *save = NULL;
|
||||||
|
|
|
@ -149,17 +149,19 @@ static int action_select_input_desc(const char *path, const char *label, unsigne
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_KEYMAPPER
|
#ifdef HAVE_KEYMAPPER
|
||||||
static int action_select_input_desc_kbd(const char *path, const char *label, unsigned type,
|
static int action_select_input_desc_kbd(const char *path,
|
||||||
|
const char *label, unsigned type,
|
||||||
size_t idx)
|
size_t idx)
|
||||||
{
|
{
|
||||||
return action_right_input_desc_kbd(type, label, true);
|
return action_right_input_desc_kbd(type, label, true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int action_select_netplay_connect_room(const char *path, const char *label, unsigned type,
|
|
||||||
size_t idx)
|
|
||||||
{
|
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
|
static int action_select_netplay_connect_room(const char *path,
|
||||||
|
const char *label, unsigned type,
|
||||||
|
size_t idx)
|
||||||
|
{
|
||||||
char tmp_hostname[4115];
|
char tmp_hostname[4115];
|
||||||
|
|
||||||
tmp_hostname[0] = '\0';
|
tmp_hostname[0] = '\0';
|
||||||
|
@ -173,16 +175,16 @@ static int action_select_netplay_connect_room(const char *path, const char *labe
|
||||||
snprintf(tmp_hostname,
|
snprintf(tmp_hostname,
|
||||||
sizeof(tmp_hostname),
|
sizeof(tmp_hostname),
|
||||||
"%s|%d",
|
"%s|%d",
|
||||||
netplay_room_list[idx - 3].mitm_address,
|
netplay_room_list[idx - 3].mitm_address,
|
||||||
netplay_room_list[idx - 3].mitm_port);
|
netplay_room_list[idx - 3].mitm_port);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
snprintf(tmp_hostname,
|
snprintf(tmp_hostname,
|
||||||
sizeof(tmp_hostname),
|
sizeof(tmp_hostname),
|
||||||
"%s|%d",
|
"%s|%d",
|
||||||
netplay_room_list[idx - 3].address,
|
netplay_room_list[idx - 3].address,
|
||||||
netplay_room_list[idx - 3].port);
|
netplay_room_list[idx - 3].port);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -193,15 +195,12 @@ static int action_select_netplay_connect_room(const char *path, const char *labe
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
task_push_netplay_crc_scan(netplay_room_list[idx - 3].gamecrc,
|
task_push_netplay_crc_scan(netplay_room_list[idx - 3].gamecrc,
|
||||||
netplay_room_list[idx - 3].gamename,
|
netplay_room_list[idx - 3].gamename,
|
||||||
tmp_hostname, netplay_room_list[idx - 3].corename);
|
tmp_hostname, netplay_room_list[idx - 3].corename);
|
||||||
|
|
||||||
#else
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int menu_cbs_init_bind_select_compare_type(
|
static int menu_cbs_init_bind_select_compare_type(
|
||||||
menu_file_list_cbs_t *cbs, unsigned type)
|
menu_file_list_cbs_t *cbs, unsigned type)
|
||||||
|
|
|
@ -2587,6 +2587,7 @@ static int menu_displaylist_parse_load_content_settings(
|
||||||
MENU_SETTING_ACTION_SCREENSHOT, 0, 0);
|
MENU_SETTING_ACTION_SCREENSHOT, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_CHEEVOS
|
||||||
if (settings->bools.quick_menu_show_save_load_state &&
|
if (settings->bools.quick_menu_show_save_load_state &&
|
||||||
!(settings->bools.cheevos_hardcore_mode_enable && cheevos_loaded))
|
!(settings->bools.cheevos_hardcore_mode_enable && cheevos_loaded))
|
||||||
{
|
{
|
||||||
|
@ -2622,6 +2623,7 @@ static int menu_displaylist_parse_load_content_settings(
|
||||||
MENU_ENUM_LABEL_UNDO_SAVE_STATE,
|
MENU_ENUM_LABEL_UNDO_SAVE_STATE,
|
||||||
MENU_SETTING_ACTION_LOADSTATE, 0, 0);
|
MENU_SETTING_ACTION_LOADSTATE, 0, 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (settings->bools.quick_menu_show_add_to_favorites)
|
if (settings->bools.quick_menu_show_add_to_favorites)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue