From 8bad48bcbda8bf040ea10d955d9a6ded0251dfd3 Mon Sep 17 00:00:00 2001 From: "David G. F" Date: Thu, 21 Dec 2023 22:48:27 +0100 Subject: [PATCH] Fix LAN room join for netpacket cores (#16026) Tested by @schellingb --- menu/cbs/menu_cbs_ok.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 9c86d92c8ab..d5858a3c816 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -6237,8 +6237,18 @@ static int action_ok_netplay_connect_room(const char *path, const char *label, else snprintf(hostname, sizeof(hostname), "%s|%d", room->address, room->port); - task_push_netplay_crc_scan(room->gamecrc, room->gamename, - room->subsystem_name, room->corename, hostname); + if (netplay_driver_ctl(RARCH_NETPLAY_CTL_USE_CORE_PACKET_INTERFACE, NULL)) + { + netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL); + command_event(CMD_EVENT_NETPLAY_INIT_DIRECT, (void*)hostname); + menu_input_dialog_end(); + retroarch_menu_running_finished(false); + } + else + { + task_push_netplay_crc_scan(room->gamecrc, room->gamename, + room->subsystem_name, room->corename, hostname); + } return 0; }