From f6d0de0ed5746945fd170fe73ab13a8c98d3c25d Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 12 Aug 2019 11:43:43 +0200 Subject: [PATCH] Cleanups --- retroarch.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/retroarch.c b/retroarch.c index c6e837c934..65f5d1552f 100644 --- a/retroarch.c +++ b/retroarch.c @@ -2166,6 +2166,25 @@ error: return false; } +static bool command_verify(const char *cmd) +{ + unsigned i; + + if (command_get_arg(cmd, NULL, NULL)) + return true; + + RARCH_ERR("Command \"%s\" is not recognized by the program.\n", cmd); + RARCH_ERR("\tValid commands:\n"); + for (i = 0; i < sizeof(map) / sizeof(map[0]); i++) + RARCH_ERR("\t\t%s\n", map[i].str); + + for (i = 0; i < sizeof(action_map) / sizeof(action_map[0]); i++) + RARCH_ERR("\t\t%s %s\n", action_map[i].str, action_map[i].arg_desc); + + return false; +} + + static bool command_network_send(const char *cmd_) { bool ret = false; @@ -2293,24 +2312,6 @@ static void command_network_poll(command_t *handle) } } -static bool command_verify(const char *cmd) -{ - unsigned i; - - if (command_get_arg(cmd, NULL, NULL)) - return true; - - RARCH_ERR("Command \"%s\" is not recognized by the program.\n", cmd); - RARCH_ERR("\tValid commands:\n"); - for (i = 0; i < sizeof(map) / sizeof(map[0]); i++) - RARCH_ERR("\t\t%s\n", map[i].str); - - for (i = 0; i < sizeof(action_map) / sizeof(action_map[0]); i++) - RARCH_ERR("\t\t%s %s\n", action_map[i].str, action_map[i].arg_desc); - - return false; -} - static bool command_free(command_t *handle) { #if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD)