[*] Win32 regression

This commit is contained in:
Reece Wilson 2022-04-05 14:46:19 +01:00
parent 311b13bc32
commit 7705e32c59
3 changed files with 7 additions and 14 deletions

View File

@ -85,5 +85,4 @@ namespace Aurora::Loop
return NewLSOSHandle(reinterpret_cast<AuUInt>(handle));
}
#endif
}
}

View File

@ -16,7 +16,10 @@ namespace Aurora::Loop
LSHandle::LSHandle(AuUInt handle) : handle(handle)
{}
LSHandle::LSHandle(AuUInt handleRd, AuUInt handleWr) : handle(handleRd), handleWr(handleWr)
LSHandle::LSHandle(AuUInt handleRd, AuUInt handleWr) : handle(handleRd)
#if defined(AURORA_IS_POSIX_DERIVED)
, handleWr(handleWr)
#endif
{}
bool LSHandle::OnTrigger(AuUInt handle)
@ -73,25 +76,16 @@ namespace Aurora::Loop
#if defined(AURORA_IS_POSIX_DERIVED)
return this->handle != kInvalidHandle || this->handleWr != kInvalidHandle;
#elif defined(AURORA_IS_MODERNNT_DERIVED)
return this->handle != reinterpret_cast<AuUInt>(kInvalidHandle);
return this->handle != kInvalidHandle;
#endif
}
AUKN_SYM AuSPtr<ILoopSource> NewLSOSHandle(AuUInt handle)
{
#if defined(AURORA_IS_MODERNNT_DERIVED)
if (reinterpret_cast<HANDLE>(handle) == kInvalidHandle)
{
return {};
}
#endif
#if defined(AURORA_IS_POSIX_DERIVED)
if (handle == kInvalidHandle)
{
return {};
}
#endif
return AuMakeShared<LSHandle>(handle);
}

View File

@ -12,7 +12,7 @@
namespace Aurora::Loop
{
#if defined(AURORA_IS_MODERNNT_DERIVED)
static constexpr auto kInvalidHandle = INVALID_HANDLE_VALUE;
static constexpr auto kInvalidHandle = (AuUInt)INVALID_HANDLE_VALUE;
#else
static constexpr auto kInvalidHandle = -1;
#endif