From 5ecd86708b10d887894ac743e9d1b5e7f5ae9ec5 Mon Sep 17 00:00:00 2001 From: Matthew Parlane Date: Mon, 26 Aug 2013 23:24:01 +1200 Subject: [PATCH] Disable Wii Sockets for NetPlay and TAS --- Source/Core/Core/Src/IPC_HLE/WII_Socket.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_Socket.cpp b/Source/Core/Core/Src/IPC_HLE/WII_Socket.cpp index 3993008486..e65eeacb01 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_Socket.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_Socket.cpp @@ -5,6 +5,9 @@ #include "WII_Socket.h" #include "WII_IPC_HLE.h" #include "WII_IPC_HLE_Device.h" +// No Wii socket support while using NetPlay or TAS +#include "NetPlayClient.h" +#include "Movie.h" using WII_IPC_HLE_Interface::ECommandType; using WII_IPC_HLE_Interface::COMMAND_IOCTL; @@ -531,6 +534,13 @@ void WiiSocket::doSock(u32 _CommandAddress, SSL_IOCTL type) s32 WiiSockMan::newSocket(s32 af, s32 type, s32 protocol) { + if (NetPlay::IsNetPlayRunning() + || Movie::IsRecordingInput() + || Movie::IsPlayingInput()) + { + return SO_ENOMEM; + } + s32 s = (s32)socket(af, type, protocol); s32 ret = getNetErrorCode(s, "newSocket", false); if (ret >= 0)