Skip to content

Commit

Permalink
Disable Wii Sockets for NetPlay and TAS
Browse files Browse the repository at this point in the history
  • Loading branch information
Parlane committed Aug 26, 2013
1 parent 15f8603 commit 5ecd867
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Source/Core/Core/Src/IPC_HLE/WII_Socket.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5ecd867

Please sign in to comment.