Merge pull request #5307 from fr500/master
Start adding descriptions to lobbies
This commit is contained in:
commit
442339a63e
|
@ -8,6 +8,8 @@
|
||||||
- INPUT: Overlay controller response - when we press buttons on the gamepad or keyboard, the corresponding buttons on the overlay will be highlighted as well.
|
- INPUT: Overlay controller response - when we press buttons on the gamepad or keyboard, the corresponding buttons on the overlay will be highlighted as well.
|
||||||
- NETBSD: Silence some compilation warnings.
|
- NETBSD: Silence some compilation warnings.
|
||||||
- COMMON: Fixed bug 'Deleting an entry from a playlist would not update the list view inside XMB'.
|
- COMMON: Fixed bug 'Deleting an entry from a playlist would not update the list view inside XMB'.
|
||||||
|
- COMMON: Fix inet_ntop_compat on *nix
|
||||||
|
- LOBBY: Add skeleton to add help descriptions to lobbies
|
||||||
|
|
||||||
# 1.6.5
|
# 1.6.5
|
||||||
Skipped this one.
|
Skipped this one.
|
||||||
|
|
|
@ -393,6 +393,8 @@ const char *inet_ntop_compat(int af, const void *src, char *dst, socklen_t cnt)
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
return inet_ntop(af, src, dst, cnt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include "../menu_driver.h"
|
#include "../menu_driver.h"
|
||||||
#include "../menu_cbs.h"
|
#include "../menu_cbs.h"
|
||||||
|
#include "../verbosity.h"
|
||||||
|
|
||||||
#include "../widgets/menu_dialog.h"
|
#include "../widgets/menu_dialog.h"
|
||||||
|
|
||||||
|
@ -26,6 +27,10 @@
|
||||||
cbs->action_info_ident = #name;
|
cbs->action_info_ident = #name;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETWORKING
|
||||||
|
#include "../../network/netplay/netplay_discovery.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
static int action_info_default(unsigned type, const char *label)
|
static int action_info_default(unsigned type, const char *label)
|
||||||
{
|
{
|
||||||
menu_displaylist_info_t info = {0};
|
menu_displaylist_info_t info = {0};
|
||||||
|
@ -60,8 +65,22 @@ static int action_info_cheevos(unsigned type, const char *label)
|
||||||
menu_dialog_set_current_id(new_id);
|
menu_dialog_set_current_id(new_id);
|
||||||
|
|
||||||
return generic_action_ok_help(NULL, label, new_id, 0, 0,
|
return generic_action_ok_help(NULL, label, new_id, 0, 0,
|
||||||
MENU_ENUM_LABEL_CHEEVOS_DESCRIPTION,
|
MENU_ENUM_LABEL_CHEEVOS_DESCRIPTION,
|
||||||
MENU_DIALOG_HELP_CHEEVOS_DESCRIPTION);
|
MENU_DIALOG_HELP_CHEEVOS_DESCRIPTION);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETWORKING
|
||||||
|
static int action_info_room(unsigned type, const char *label)
|
||||||
|
{
|
||||||
|
unsigned new_id = type - MENU_SETTINGS_NETPLAY_ROOMS_START;
|
||||||
|
#if 1
|
||||||
|
RARCH_LOG ("Room id: %u IP: %s Port: %u\n", new_id,
|
||||||
|
netplay_room_list[new_id].address, netplay_room_list[new_id].port);
|
||||||
|
#endif
|
||||||
|
/* add description here
|
||||||
|
the relevant data is in netplay_room_list[new_id]*/
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -72,13 +91,22 @@ int menu_cbs_init_bind_info(menu_file_list_cbs_t *cbs,
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
#ifdef HAVE_CHEEVOS
|
#ifdef HAVE_CHEEVOS
|
||||||
if ((type >= MENU_SETTINGS_CHEEVOS_START))
|
if ((type >= MENU_SETTINGS_CHEEVOS_START) &&
|
||||||
|
(type < MENU_SETTINGS_NETPLAY_ROOMS_START))
|
||||||
{
|
{
|
||||||
BIND_ACTION_INFO(cbs, action_info_cheevos);
|
BIND_ACTION_INFO(cbs, action_info_cheevos);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_NETWORKING
|
||||||
|
if ((type >= MENU_SETTINGS_NETPLAY_ROOMS_START))
|
||||||
|
{
|
||||||
|
BIND_ACTION_INFO(cbs, action_info_room);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
BIND_ACTION_INFO(cbs, action_info_default);
|
BIND_ACTION_INFO(cbs, action_info_default);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -3417,7 +3417,6 @@ void netplay_refresh_rooms_menu(file_list_t *list)
|
||||||
{
|
{
|
||||||
char s[4115];
|
char s[4115];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int j = 0;
|
|
||||||
|
|
||||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, list);
|
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, list);
|
||||||
|
|
||||||
|
@ -3496,20 +3495,18 @@ void netplay_refresh_rooms_menu(file_list_t *list)
|
||||||
netplay_room_list[i].gamecrc,
|
netplay_room_list[i].gamecrc,
|
||||||
netplay_room_list[i].timestamp);
|
netplay_room_list[i].timestamp);
|
||||||
#endif
|
#endif
|
||||||
j+=8;
|
|
||||||
snprintf(s, sizeof(s), "%s: %s%s",
|
snprintf(s, sizeof(s), "%s: %s%s",
|
||||||
netplay_room_list[i].lan ? "Local" :
|
netplay_room_list[i].lan ? "Local" :
|
||||||
(netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM ?
|
(netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM ?
|
||||||
"Internet (relay)" : "Internet (direct)"),
|
"Internet (relay)" : "Internet (direct)"),
|
||||||
netplay_room_list[i].nickname, country);
|
netplay_room_list[i].nickname, country);
|
||||||
|
|
||||||
/*int room_type = netplay_room_list[i].lan ? MENU_ROOM_LAN :
|
|
||||||
(netplay_room_list[i].host_method == NETPLAY_HOST_METHOD_MITM ? MENU_ROOM_MITM : MENU_ROOM); */
|
|
||||||
menu_entries_append_enum(list,
|
menu_entries_append_enum(list,
|
||||||
s,
|
s,
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM),
|
msg_hash_to_str(MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM),
|
||||||
MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM,
|
MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM,
|
||||||
MENU_ROOM, 0, 0);
|
MENU_SETTINGS_NETPLAY_ROOMS_START + i, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
netplay_rooms_free();
|
netplay_rooms_free();
|
||||||
|
|
|
@ -45,6 +45,8 @@
|
||||||
|
|
||||||
#include "../../retroarch.h"
|
#include "../../retroarch.h"
|
||||||
#include "../../version.h"
|
#include "../../version.h"
|
||||||
|
#include "../../verbosity.h"
|
||||||
|
|
||||||
#include "netplay.h"
|
#include "netplay.h"
|
||||||
#include "netplay_discovery.h"
|
#include "netplay_discovery.h"
|
||||||
#include "netplay_private.h"
|
#include "netplay_private.h"
|
||||||
|
@ -346,6 +348,7 @@ static bool netplay_lan_ad_client(void)
|
||||||
/* And that we know how to handle it */
|
/* And that we know how to handle it */
|
||||||
if (their_addr.sa_family == AF_INET)
|
if (their_addr.sa_family == AF_INET)
|
||||||
{
|
{
|
||||||
|
RARCH_WARN ("[lobby] using IPv4 for discovery\n");
|
||||||
struct sockaddr_in *sin = (struct sockaddr_in *) &their_addr;
|
struct sockaddr_in *sin = (struct sockaddr_in *) &their_addr;
|
||||||
sin->sin_port = htons(ntohl(ad_packet_buffer.port));
|
sin->sin_port = htons(ntohl(ad_packet_buffer.port));
|
||||||
|
|
||||||
|
@ -353,6 +356,7 @@ static bool netplay_lan_ad_client(void)
|
||||||
#ifdef HAVE_INET6
|
#ifdef HAVE_INET6
|
||||||
else if (their_addr.sa_family == AF_INET6)
|
else if (their_addr.sa_family == AF_INET6)
|
||||||
{
|
{
|
||||||
|
RARCH_WARN ("[lobby] using IPv6 for discovery\n");
|
||||||
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &their_addr;
|
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &their_addr;
|
||||||
sin6->sin6_port = htons(ad_packet_buffer.port);
|
sin6->sin6_port = htons(ad_packet_buffer.port);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue