/*** Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: LSHandle.cpp Date: 2021-10-1 Author: Reece ***/ #include #include "LSHandle.hpp" namespace Aurora::Loop { LSHandle::LSHandle(AuUInt handle) : handle(handle), reference({handle}) {} bool LSHandle::OnTrigger(AuUInt handle) { return true; } AuList LSHandle::GetHandles() { return reference; } ELoopSource LSHandle::GetType() { return ELoopSource::eSourceHandle; } bool LSHandle::HasValidHandle() { return handle != reinterpret_cast(INVALID_HANDLE_VALUE); } AUKN_SYM AuSPtr NewLSOSHandle(AuUInt handle) { auto h = reinterpret_cast(handle); if (h == INVALID_HANDLE_VALUE) { return {}; } return AuMakeShared(handle); } }