mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -06:00
forgot Windows needs extra setup for sockets
This commit is contained in:
@ -55,6 +55,14 @@ bool MP_Init()
|
|||||||
BOOL opt_true = TRUE;
|
BOOL opt_true = TRUE;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
WSADATA wsadata;
|
||||||
|
if (WSAStartup(MAKEWORD(2, 2), &wsadata) != 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif // __WXMSW__
|
||||||
|
|
||||||
MPSocket = socket(AF_INET, SOCK_DGRAM, 0);
|
MPSocket = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (MPSocket < 0)
|
if (MPSocket < 0)
|
||||||
{
|
{
|
||||||
@ -100,6 +108,10 @@ void MP_DeInit()
|
|||||||
{
|
{
|
||||||
if (MPSocket >= 0)
|
if (MPSocket >= 0)
|
||||||
closesocket(MPSocket);
|
closesocket(MPSocket);
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
WSACleanup();
|
||||||
|
#endif // __WXMSW__
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user