Some cleanups
This commit is contained in:
parent
6b9100143c
commit
7d6b7b7729
12
command.c
12
command.c
|
@ -25,19 +25,13 @@
|
|||
#include <compat/strl.h>
|
||||
#include <compat/posix_string.h>
|
||||
#include <file/file_path.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <net/net_compat.h>
|
||||
|
||||
#include "msg_hash.h"
|
||||
|
||||
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
||||
#include "netplay.h"
|
||||
#endif
|
||||
|
||||
#include "command.h"
|
||||
|
||||
#include "general.h"
|
||||
#include "runloop.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#define DEFAULT_NETWORK_CMD_PORT 55355
|
||||
|
@ -625,9 +619,6 @@ bool network_cmd_send(const char *cmd_)
|
|||
const char *cmd = NULL;
|
||||
const char *host = NULL;
|
||||
const char *port_ = NULL;
|
||||
global_t *global = global_get_ptr();
|
||||
bool *verbose = retro_main_verbosity();
|
||||
bool old_verbose = global ? *verbose : false;
|
||||
uint16_t port = DEFAULT_NETWORK_CMD_PORT;
|
||||
|
||||
if (!network_init())
|
||||
|
@ -636,8 +627,6 @@ bool network_cmd_send(const char *cmd_)
|
|||
if (!(command = strdup(cmd_)))
|
||||
return false;
|
||||
|
||||
*verbose = true;
|
||||
|
||||
cmd = strtok_r(command, ";", &save);
|
||||
if (cmd)
|
||||
host = strtok_r(NULL, ";", &save);
|
||||
|
@ -663,7 +652,6 @@ bool network_cmd_send(const char *cmd_)
|
|||
ret = verify_command(cmd) && send_udp_packet(host, port, cmd);
|
||||
free(command);
|
||||
|
||||
*verbose = old_verbose;
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue