From 4ded13813901993e66e799c0c18eb7eb18fc5592 Mon Sep 17 00:00:00 2001 From: Hexagon12 Date: Sat, 4 Nov 2017 16:30:48 +0200 Subject: [PATCH] Update soc_u.cpp --- src/core/hle/service/soc_u.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp index f2f91e7c2e..4ef3002d8c 100644 --- a/src/core/hle/service/soc_u.cpp +++ b/src/core/hle/service/soc_u.cpp @@ -780,10 +780,6 @@ static void Connect(Interface* self) { static void InitializeSockets(Interface* self) { // TODO(Subv): Implement -#ifdef _WIN32 - WSADATA data; - WSAStartup(MAKEWORD(2, 2), &data); -#endif u32* cmd_buffer = Kernel::GetCommandBuffer(); cmd_buffer[0] = IPC::MakeHeader(1, 1, 0); @@ -900,10 +896,18 @@ const Interface::FunctionInfo FunctionTable[] = { SOC_U::SOC_U() { Register(FunctionTable); + +#ifdef _WIN32 + WSADATA data; + WSAStartup(MAKEWORD(2, 2), &data); +#endif } SOC_U::~SOC_U() { CleanupSockets(); +#ifdef _WIN32 + WSACleanup(); +#endif } } // namespace SOC