Win32: Fix compilation with NAZARA_CORE_WINDOWS_VISTA

Former-commit-id: 6249451f41f2dce01652ea61866aa17053ffa4cc [formerly 3db7c2e797fbaa519b303fd533e0184c60781505] [formerly 3342dd5ea892e839757fb3e2e567352c718889de [formerly 174f4491e3141badbce1ded1e4f8e7f2cec2a3d7]]
Former-commit-id: d80442b18af96bdecc17bc5409d42483a3a80cd2 [formerly 05adb7a04a120d5989c4307adfdd6f34beef313d]
Former-commit-id: bce1c276014724556464f34d2112e6465202cf93
This commit is contained in:
Lynix 2016-09-25 02:53:07 +02:00
parent 48c0315ea6
commit 62be0e21df
2 changed files with 5 additions and 5 deletions

View File

@ -57,7 +57,7 @@ namespace Nz
bool ConditionVariableImpl::Wait(MutexImpl* mutex, UInt32 timeout)
{
#if NAZARA_CORE_WINDOWS_VISTA
return SleepConditionVariableCS(&m_cv, &mutex->m_criticalSection, timeout);
return SleepConditionVariableCS(&m_cv, &mutex->m_criticalSection, timeout) == TRUE;
#else
m_count++;

View File

@ -18,7 +18,7 @@ namespace Nz
int GetAddressInfo(const String& hostname, const String& service, const addrinfoImpl* hints, addrinfoImpl** results)
{
return GetAddrInfoW(hostname.GetWideString().c_str(), service.GetWideString().c_str(), &hints, &servinfo);
return GetAddrInfoW(hostname.GetWideString().c_str(), service.GetWideString().c_str(), hints, results);
}
int GetHostnameInfo(sockaddr* socketAddress, socklen_t socketLen, String* hostname, String* service, INT flags)
@ -26,14 +26,14 @@ namespace Nz
std::array<wchar_t, NI_MAXHOST> hostnameBuffer;
std::array<wchar_t, NI_MAXSERV> serviceBuffer;
int result = GetNameInfoW(socketAddress, socketLen, hostnameBuffer.data(), hostnameBuffer.size(), serviceBuffer.data(), serviceBuffer.size(), flags);
int result = GetNameInfoW(socketAddress, socketLen, hostnameBuffer.data(), static_cast<DWORD>(hostnameBuffer.size()), serviceBuffer.data(), static_cast<DWORD>(serviceBuffer.size()), flags);
if (result == 0)
{
if (hostname)
hostname->Set(hostnameBuffer.data());
*hostname = std::move(String::Unicode(hostnameBuffer.data()));
if (service)
service->Set(serviceBuffer.data());
*service = std::move(String::Unicode(serviceBuffer.data()));
}
return result;