From f21c520e2884f8a9d3ab826cd82f9bab7bb61ca8 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 28 Sep 2017 09:29:36 +0200 Subject: [PATCH] Cleanups --- command.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/command.c b/command.c index 26230d469b..df1145be11 100644 --- a/command.c +++ b/command.c @@ -89,8 +89,6 @@ #define DEFAULT_NETWORK_CMD_PORT 55355 #define STDIN_BUF_SIZE 4096 -extern int libui_main(void); - enum cmd_source_t { CMD_NONE = 0, @@ -113,27 +111,25 @@ struct cmd_action_map struct command { -#ifdef HAVE_STDIN_CMD bool stdin_enable; + bool state[RARCH_BIND_LIST_END]; +#ifdef HAVE_STDIN_CMD char stdin_buf[STDIN_BUF_SIZE]; size_t stdin_buf_ptr; #endif - #if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) int net_fd; #endif - - bool state[RARCH_BIND_LIST_END]; }; static bool command_read_ram(const char *arg); static bool command_write_ram(const char *arg); static const struct cmd_action_map action_map[] = { - { "SET_SHADER", command_set_shader, "" }, + { "SET_SHADER", command_set_shader, "" }, #ifdef HAVE_CHEEVOS - { "READ_CORE_RAM", command_read_ram, "
" }, - { "WRITE_CORE_RAM", command_write_ram, "
..." }, + { "READ_CORE_RAM", command_read_ram, "
" }, + { "WRITE_CORE_RAM", command_write_ram, "
..." }, #endif }; @@ -180,7 +176,6 @@ static const struct cmd_map map[] = { { "MENU_B", RETRO_DEVICE_ID_JOYPAD_B }, }; - static enum cmd_source_t lastcmd_source; #if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) static int lastcmd_net_fd; @@ -274,9 +269,7 @@ static bool command_read_ram(const char *arg) unsigned nbytes = strtol(reply_at, NULL, 10); for (i=0;i