mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-18 18:58:55 +02:00
Common/Network: Add StrNetworkError helper function
This commit is contained in:
@ -566,4 +566,14 @@ const char* DecodeNetworkError(s32 error_code)
|
||||
return strerror_r(error_code, buffer, sizeof(buffer));
|
||||
#endif
|
||||
}
|
||||
|
||||
const char* StrNetworkError()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
const s32 error_code = WSAGetLastError();
|
||||
#else
|
||||
const s32 error_code = errno;
|
||||
#endif
|
||||
return DecodeNetworkError(error_code);
|
||||
}
|
||||
} // namespace Common
|
||||
|
Reference in New Issue
Block a user