Update to NazaraUtils 2023.12.28

This commit is contained in:
SirLynix 2023-12-28 13:26:04 +01:00
parent 3d21401569
commit 08eaf396ed
7 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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());

View File

@ -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)

View File

@ -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);

View File

@ -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;

View File

@ -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
{

View File

@ -263,7 +263,7 @@ end
add_repositories("nazara-engine-repo https://github.com/NazaraEngine/xmake-repo")
add_requires("entt 3.12.2", "fmt", "frozen", "nazarautils >=2023.11.12")
add_requires("entt 3.12.2", "fmt", "frozen", "nazarautils >=2023.12.28")
-- Module dependencies
if has_config("audio") then
@ -555,7 +555,7 @@ for name, module in pairs(modules) do
end
if is_plat("windows", "mingw") then
add_defines("NAZARA_UTILS_WINDOWS_NT6=1")
add_defines("NAZARAUTILS_WINDOWS_NT6=1")
end
ModuleTargetConfig(name, module)