mirror of
https://github.com/libretro/RetroArch
synced 2025-02-27 00:40:20 +00:00
Build fix - make RetroArch work without HAVE_NETPLAY defined
This commit is contained in:
parent
2c2f60cab4
commit
25e0ead417
@ -61,7 +61,7 @@ static bool socket_nonblock(int fd)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_NETWORK_CMD
|
||||
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
||||
static bool cmd_init_network(rarch_cmd_t *handle, uint16_t port)
|
||||
{
|
||||
if (!netplay_init_network())
|
||||
@ -129,7 +129,7 @@ rarch_cmd_t *rarch_cmd_new(bool stdin_enable, bool network_enable, uint16_t port
|
||||
if (!handle)
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_NETWORK_CMD
|
||||
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
||||
handle->net_fd = -1;
|
||||
if (network_enable && !cmd_init_network(handle, port))
|
||||
goto error;
|
||||
@ -499,7 +499,7 @@ void rarch_cmd_poll(rarch_cmd_t *handle)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_NETWORK_CMD
|
||||
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
||||
static bool send_udp_packet(const char *host, uint16_t port, const char *msg)
|
||||
{
|
||||
struct addrinfo hints, *res = NULL;
|
||||
|
@ -84,6 +84,8 @@ void netplay_ipaddress_callback(void *userdata, const char *str)
|
||||
menu_key_end_line(menu);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void netplay_nickname_callback(void *userdata, const char *str)
|
||||
{
|
||||
menu_handle_t *menu = (menu_handle_t*)userdata;
|
||||
@ -97,7 +99,6 @@ void netplay_nickname_callback(void *userdata, const char *str)
|
||||
}
|
||||
menu_key_end_line(menu);
|
||||
}
|
||||
#endif
|
||||
|
||||
void audio_device_callback(void *userdata, const char *str)
|
||||
{
|
||||
|
@ -795,7 +795,7 @@ static void print_help(void)
|
||||
puts("\t\tHowever, the client will not be able to play. Multiple clients can connect to the host.");
|
||||
#endif
|
||||
puts("\t--nick: Picks a username (for use with netplay). Not mandatory.");
|
||||
#ifdef HAVE_NETWORK_CMD
|
||||
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
||||
puts("\t--command: Sends a command over UDP to an already running RetroArch process.");
|
||||
puts("\t\tAvailable commands are listed if command is invalid.");
|
||||
#endif
|
||||
@ -952,7 +952,7 @@ static void parse_input(int argc, char *argv[])
|
||||
{ "spectate", 0, &val, 'S' },
|
||||
#endif
|
||||
{ "nick", 1, &val, 'N' },
|
||||
#ifdef HAVE_NETWORK_CMD
|
||||
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
||||
{ "command", 1, &val, 'c' },
|
||||
#endif
|
||||
{ "ups", 1, NULL, 'U' },
|
||||
@ -1182,7 +1182,7 @@ static void parse_input(int argc, char *argv[])
|
||||
strlcpy(g_settings.username, optarg, sizeof(g_settings.username));
|
||||
break;
|
||||
|
||||
#ifdef HAVE_NETWORK_CMD
|
||||
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
||||
case 'c':
|
||||
if (network_cmd_send(optarg))
|
||||
exit(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user