mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Make sure winsock errors always gets logged
Make sure it always gets logged to the disk.
This commit is contained in:
parent
22d2cc5a7a
commit
df7e80077f
@ -41,7 +41,7 @@ void SDK_Init()
|
|||||||
Console_Init();
|
Console_Init();
|
||||||
#endif // !DEDICATED
|
#endif // !DEDICATED
|
||||||
SpdLog_Init();
|
SpdLog_Init();
|
||||||
WinSock_Init(); // Initialize Winsock.
|
Winsock_Init(); // Initialize Winsock.
|
||||||
|
|
||||||
for (size_t i = 0; i < SDK_ARRAYSIZE(R5R_EMBLEM); i++)
|
for (size_t i = 0; i < SDK_ARRAYSIZE(R5R_EMBLEM); i++)
|
||||||
{
|
{
|
||||||
@ -76,7 +76,7 @@ void SDK_Shutdown()
|
|||||||
|
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
|
|
||||||
WinSock_Shutdown();
|
Winsock_Shutdown();
|
||||||
Systems_Shutdown();
|
Systems_Shutdown();
|
||||||
WinSys_Shutdown();
|
WinSys_Shutdown();
|
||||||
|
|
||||||
|
@ -234,21 +234,21 @@ void Systems_Shutdown()
|
|||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|
||||||
void WinSock_Init()
|
void Winsock_Init()
|
||||||
{
|
{
|
||||||
WSAData wsaData{};
|
WSAData wsaData{};
|
||||||
int nError = ::WSAStartup(MAKEWORD(2, 2), &wsaData);
|
int nError = ::WSAStartup(MAKEWORD(2, 2), &wsaData);
|
||||||
if (nError != 0)
|
if (nError != 0)
|
||||||
{
|
{
|
||||||
spdlog::error("{:s}: Failed to start Winsock: ({:s})\n", __FUNCTION__, NET_ErrorString(WSAGetLastError()));
|
Error(eDLL_T::COMMON, NO_ERROR, "%s: Failed to start Winsock: (%s)\n", __FUNCTION__, NET_ErrorString(WSAGetLastError()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void WinSock_Shutdown()
|
void Winsock_Shutdown()
|
||||||
{
|
{
|
||||||
int nError = ::WSACleanup();
|
int nError = ::WSACleanup();
|
||||||
if (nError != 0)
|
if (nError != 0)
|
||||||
{
|
{
|
||||||
spdlog::error("{:s}: Failed to stop Winsock: ({:s})\n", __FUNCTION__, NET_ErrorString(WSAGetLastError()));
|
Error(eDLL_T::COMMON, NO_ERROR, "%s: Failed to stop Winsock: (%s)\n", __FUNCTION__, NET_ErrorString(WSAGetLastError()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void QuerySystemInfo()
|
void QuerySystemInfo()
|
||||||
|
@ -6,8 +6,8 @@ void SDK_Shutdown();
|
|||||||
void Systems_Init();
|
void Systems_Init();
|
||||||
void Systems_Shutdown();
|
void Systems_Shutdown();
|
||||||
|
|
||||||
void WinSock_Init();
|
void Winsock_Init();
|
||||||
void WinSock_Shutdown();
|
void Winsock_Shutdown();
|
||||||
void QuerySystemInfo();
|
void QuerySystemInfo();
|
||||||
void CheckCPU();
|
void CheckCPU();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user