WSAGetLastError: fix return value
This commit is contained in:
parent
5d1f78da3b
commit
8efd5d1a74
|
@ -81,7 +81,8 @@ static s32 TranslateErrorCode(s32 native_error, bool isRW)
|
|||
}
|
||||
}
|
||||
|
||||
s32 WiiSockMan::GetNetErrorCode(s32 ret, const std::string& caller, bool isRW)
|
||||
// Don't use string! (see https://github.com/dolphin-emu/dolphin/pull/3143)
|
||||
s32 WiiSockMan::GetNetErrorCode(s32 ret, const char* caller, bool isRW)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
s32 errorCode = WSAGetLastError();
|
||||
|
@ -96,7 +97,7 @@ s32 WiiSockMan::GetNetErrorCode(s32 ret, const std::string& caller, bool isRW)
|
|||
}
|
||||
|
||||
INFO_LOG(WII_IPC_NET, "%s failed with error %d: %s, ret= %d",
|
||||
caller.c_str(), errorCode, DecodeError(errorCode), ret);
|
||||
caller, errorCode, DecodeError(errorCode), ret);
|
||||
|
||||
s32 ReturnValue = TranslateErrorCode(errorCode, isRW);
|
||||
WiiSockMan::GetInstance().SetLastNetError(ReturnValue);
|
||||
|
|
|
@ -201,7 +201,7 @@ public:
|
|||
class WiiSockMan : public ::NonCopyable
|
||||
{
|
||||
public:
|
||||
static s32 GetNetErrorCode(s32 ret, const std::string& caller, bool isRW);
|
||||
static s32 GetNetErrorCode(s32 ret, const char* caller, bool isRW);
|
||||
static char* DecodeError(s32 ErrorCode);
|
||||
|
||||
static WiiSockMan& GetInstance()
|
||||
|
|
Loading…
Reference in New Issue