mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
Add RARCH_CMD_NETWORK_INIT and RARCH_CMD_NETWORK_DEINIT.
Run RARCH_CMD_NETWORK_INIT before entering Core Manager option. Needed on Windows where we need to call WSAStartup to initialize Winsocks first before we can do any network stuff
This commit is contained in:
parent
de0b087666
commit
f790216a41
@ -2188,6 +2188,7 @@ static int deferred_push_core_manager_list(void *data, void *userdata,
|
||||
|
||||
(void)buf;
|
||||
|
||||
|
||||
menu_list_clear(list);
|
||||
|
||||
if (g_settings.network.buildbot_url[0] == '\0')
|
||||
@ -2205,6 +2206,8 @@ static int deferred_push_core_manager_list(void *data, void *userdata,
|
||||
}
|
||||
|
||||
#ifdef HAVE_NETPLAY
|
||||
rarch_main_command(RARCH_CMD_NETWORK_INIT);
|
||||
|
||||
fill_pathname_join(url, g_settings.network.buildbot_url,
|
||||
".index", sizeof(url));
|
||||
|
||||
|
10
retroarch.c
10
retroarch.c
@ -2928,6 +2928,16 @@ bool rarch_main_command(unsigned cmd)
|
||||
netplay_free(netplay);
|
||||
driver.netplay_data = NULL;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_NETWORK_DEINIT:
|
||||
#ifdef HAVE_NETPLAY
|
||||
network_deinit();
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_NETWORK_INIT:
|
||||
#ifdef HAVE_NETPLAY
|
||||
network_init();
|
||||
#endif
|
||||
break;
|
||||
case RARCH_CMD_NETPLAY_INIT:
|
||||
|
@ -143,6 +143,10 @@ enum basic_event
|
||||
RARCH_CMD_CHEATS_INIT,
|
||||
/* Deinitializes cheats. */
|
||||
RARCH_CMD_CHEATS_DEINIT,
|
||||
/* Deinitializes network system. */
|
||||
RARCH_CMD_NETWORK_DEINIT,
|
||||
/* Initializes network system. */
|
||||
RARCH_CMD_NETWORK_INIT,
|
||||
/* Initializes netplay system. */
|
||||
RARCH_CMD_NETPLAY_INIT,
|
||||
/* Deinitializes netplay system. */
|
||||
|
Loading…
Reference in New Issue
Block a user