Update to NazaraUtils 2023.12.28
This commit is contained in:
@@ -118,7 +118,7 @@ namespace Nz::PlatformImpl
|
||||
static SetThreadDescriptionFunc SetThreadDescription = reinterpret_cast<SetThreadDescriptionFunc>(::GetProcAddress(::GetModuleHandleW(L"Kernel32.dll"), "SetThreadDescription"));
|
||||
if (SetThreadDescription)
|
||||
SetThreadDescription(threadHandle, ToWideString(threadName).data());
|
||||
#if NAZARA_UTILS_WINDOWS_NT6
|
||||
#if NAZARAUTILS_WINDOWS_NT6
|
||||
else
|
||||
RaiseThreadNameException(::GetThreadId(threadHandle), threadName);
|
||||
#else
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Nz
|
||||
|
||||
Time GetElapsedMillisecondsImpl()
|
||||
{
|
||||
#if NAZARA_UTILS_WINDOWS_NT6
|
||||
#if NAZARAUTILS_WINDOWS_NT6
|
||||
return Time::Milliseconds(GetTickCount64());
|
||||
#else
|
||||
return Time::Milliseconds(GetTickCount());
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Nz
|
||||
{
|
||||
namespace Detail
|
||||
{
|
||||
#if NAZARA_UTILS_WINDOWS_NT6
|
||||
#if NAZARAUTILS_WINDOWS_NT6
|
||||
using addrinfoImpl = addrinfoW;
|
||||
|
||||
int GetAddressInfo(const std::string& hostname, const std::string& service, const addrinfoImpl* hints, addrinfoImpl** results)
|
||||
@@ -119,7 +119,7 @@ namespace Nz
|
||||
return IpAddress::Invalid;
|
||||
}
|
||||
|
||||
#if NAZARA_UTILS_WINDOWS_NT6
|
||||
#if NAZARAUTILS_WINDOWS_NT6
|
||||
IpAddress IpAddressImpl::FromAddrinfo(const addrinfoW* info)
|
||||
{
|
||||
switch (info->ai_family)
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Nz
|
||||
~IpAddressImpl() = delete;
|
||||
|
||||
static IpAddress FromAddrinfo(const addrinfo* info);
|
||||
#if NAZARA_UTILS_WINDOWS_NT6
|
||||
#if NAZARAUTILS_WINDOWS_NT6
|
||||
static IpAddress FromAddrinfo(const addrinfoW* info);
|
||||
#endif
|
||||
static IpAddress FromSockAddr(const sockaddr* address);
|
||||
|
||||
@@ -449,7 +449,7 @@ namespace Nz
|
||||
SocketState SocketImpl::PollConnection(SocketHandle handle, const IpAddress& /*address*/, UInt64 msTimeout, SocketError* error)
|
||||
{
|
||||
// Wait until socket is available for writing or an error occurs (ie when connection succeeds or fails)
|
||||
#if NAZARA_UTILS_WINDOWS_NT6
|
||||
#if NAZARAUTILS_WINDOWS_NT6
|
||||
WSAPOLLFD descriptor;
|
||||
descriptor.events = POLLWRNORM;
|
||||
descriptor.fd = handle;
|
||||
@@ -480,7 +480,7 @@ namespace Nz
|
||||
}
|
||||
else if (ret > 0)
|
||||
{
|
||||
#if NAZARA_UTILS_WINDOWS_NT6
|
||||
#if NAZARAUTILS_WINDOWS_NT6
|
||||
if (descriptor.revents & (POLLERR | POLLHUP))
|
||||
#else
|
||||
if (FD_ISSET(handle, &errSet))
|
||||
@@ -491,7 +491,7 @@ namespace Nz
|
||||
|
||||
return SocketState::NotConnected;
|
||||
}
|
||||
#if NAZARA_UTILS_WINDOWS_NT6
|
||||
#if NAZARAUTILS_WINDOWS_NT6
|
||||
else if (descriptor.revents & POLLWRNORM)
|
||||
#else
|
||||
else if (FD_ISSET(handle, &writeSet))
|
||||
@@ -499,7 +499,7 @@ namespace Nz
|
||||
return SocketState::Connected;
|
||||
else
|
||||
{
|
||||
#if NAZARA_UTILS_WINDOWS_NT6
|
||||
#if NAZARAUTILS_WINDOWS_NT6
|
||||
NazaraWarningFmt("Socket {0} was returned by poll without POLLOUT nor error events (events: {1:#x})", handle, descriptor.revents);
|
||||
#else
|
||||
NazaraWarningFmt("Socket {0} was returned by select but is not part of the write nor exception set", handle);
|
||||
@@ -851,7 +851,7 @@ namespace Nz
|
||||
|
||||
bool SocketImpl::SetIPv6Only(SocketHandle handle, bool ipv6Only, SocketError* error)
|
||||
{
|
||||
#if NAZARA_UTILS_WINDOWS_NT6
|
||||
#if NAZARAUTILS_WINDOWS_NT6
|
||||
NazaraAssert(handle != InvalidHandle, "Invalid handle");
|
||||
|
||||
DWORD option = ipv6Only;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <Nazara/Network/SocketHandle.hpp>
|
||||
#include <WinSock2.h>
|
||||
|
||||
#define NAZARA_NETWORK_POLL_SUPPORT NAZARA_UTILS_WINDOWS_NT6
|
||||
#define NAZARA_NETWORK_POLL_SUPPORT NAZARAUTILS_WINDOWS_NT6
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user