here have more code aaaaaaaaaaaaa

This commit is contained in:
Arisotura 2019-03-15 01:08:37 +01:00
parent 4de4631c15
commit b52458d7be
3 changed files with 20 additions and 6 deletions

View File

@ -124,7 +124,17 @@ bool Init()
void DeInit() void DeInit()
{ {
// TODO CLEANUP SHIT!!!! for (int i = 0; i < (sizeof(TCPSocketList)/sizeof(TCPSocket)); i++)
{
TCPSocket* sock = &TCPSocketList[i];
if (sock->Backend) closesocket(sock->Backend);
}
for (int i = 0; i < (sizeof(UDPSocketList)/sizeof(UDPSocket)); i++)
{
UDPSocket* sock = &UDPSocketList[i];
if (sock->Backend) closesocket(sock->Backend);
}
} }

View File

@ -279,9 +279,11 @@ bool LAN_Init()
void LAN_DeInit() void LAN_DeInit()
{ {
// checkme. blarg // checkme. blarg
if (Config::DirectLAN) //if (Config::DirectLAN)
// LAN_PCap::DeInit();
//else
// LAN_Socket::DeInit();
LAN_PCap::DeInit(); LAN_PCap::DeInit();
else
LAN_Socket::DeInit(); LAN_Socket::DeInit();
} }

View File

@ -632,6 +632,7 @@ int EmuThreadFunc(void* burp)
if (joybuttons) delete[] joybuttons; if (joybuttons) delete[] joybuttons;
NDS::DeInit(); NDS::DeInit();
Platform::LAN_DeInit();
return 44203; return 44203;
} }
@ -1679,7 +1680,8 @@ void ApplyNewSettings(int type)
Platform::MP_Init(); Platform::MP_Init();
} }
// TODO: cycle LAN shito Platform::LAN_DeInit();
Platform::LAN_Init();
} }
EmuRunning = prevstatus; EmuRunning = prevstatus;