Cleanups
This commit is contained in:
parent
178d959cad
commit
2f7f8b01c9
|
@ -2425,9 +2425,11 @@ bool command_event(enum event_command cmd, void *data)
|
||||||
break;
|
break;
|
||||||
case CMD_EVENT_NETPLAY_INIT:
|
case CMD_EVENT_NETPLAY_INIT:
|
||||||
{
|
{
|
||||||
char *hostname = (char *) data;
|
char *hostname = (char *) data;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||||
|
|
||||||
if (!init_netplay(
|
if (!init_netplay(
|
||||||
NULL, hostname ? hostname : settings->netplay.server,
|
NULL, hostname ? hostname : settings->netplay.server,
|
||||||
settings->netplay.port))
|
settings->netplay.port))
|
||||||
|
@ -2440,7 +2442,9 @@ bool command_event(enum event_command cmd, void *data)
|
||||||
case CMD_EVENT_NETPLAY_INIT_DIRECT:
|
case CMD_EVENT_NETPLAY_INIT_DIRECT:
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||||
|
|
||||||
if (!init_netplay(
|
if (!init_netplay(
|
||||||
data, NULL, settings->netplay.port))
|
data, NULL, settings->netplay.port))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue