enable local room discovery on WiiU

This commit is contained in:
radius 2018-10-11 20:15:50 -05:00
parent b8cb3fd4a7
commit e1227b2d68

View File

@ -134,7 +134,7 @@ void deinit_netplay_discovery(void)
/* Todo: implement net_ifinfo and ntohs for consoles */
bool netplay_discovery_driver_ctl(enum rarch_netplay_discovery_ctl_state state, void *data)
{
#ifndef RARCH_CONSOLE
#if defined(WIIU) || !defined(RARCH_CONSOLE)
char port_str[6];
int ret;
unsigned k = 0;
@ -162,7 +162,7 @@ bool netplay_discovery_driver_ctl(enum rarch_netplay_discovery_ctl_state state,
#if defined(SOL_SOCKET) && defined(SO_BROADCAST)
if (setsockopt(lan_ad_client_fd, SOL_SOCKET, SO_BROADCAST,
(const char *)&canBroadcast, sizeof(canBroadcast)) < 0)
RARCH_WARN("[discovery] Failed to set netplay discovery port to broadcast\n");
RARCH_WARN("[discovery] Failed to set netplay discovery port to broadcast\n");
#endif
/* Put together the request */
@ -238,7 +238,7 @@ error:
bool netplay_lan_ad_server(netplay_t *netplay)
{
/* Todo: implement net_ifinfo and ntohs for consoles */
#ifndef RARCH_CONSOLE
#if defined(WIIU) || !defined(RARCH_CONSOLE)
fd_set fds;
int ret;
struct timeval tmp_tv = {0};
@ -255,7 +255,7 @@ bool netplay_lan_ad_server(netplay_t *netplay)
return false;
if (lan_ad_server_fd < 0 && !init_lan_ad_server_socket(netplay, RARCH_DEFAULT_PORT))
return false;
return false;
/* Check for any ad queries */
while (1)