Merge pull request #7418 from fr500/lanrooms

enable local room discovery on WiiU
This commit is contained in:
Twinaphex 2018-10-12 03:27:51 +02:00 committed by GitHub
commit 75485e79a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)