From 0510ee20aed6b3c9022b7eaf594a06627d9c32b8 Mon Sep 17 00:00:00 2001 From: Reece Date: Thu, 20 Jan 2022 17:45:52 +0000 Subject: [PATCH] [*] Loop should always enter alertable mode [*] More AuList -> AuByteBuffer --- Include/Aurora/IO/FS/FS.hpp | 3 ++- Source/Crypto/RSA/RSAPrivate.cpp | 2 +- Source/IO/FS/FS.Generic.cpp | 2 +- Source/IO/FS/FS.NT.cpp | 2 +- Source/IO/FS/FS.cpp | 2 +- Source/IO/FS/FileStream.NT.cpp | 2 +- Source/Loop/Loop.NT.cpp | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Include/Aurora/IO/FS/FS.hpp b/Include/Aurora/IO/FS/FS.hpp index 8669277c..1e2229ab 100644 --- a/Include/Aurora/IO/FS/FS.hpp +++ b/Include/Aurora/IO/FS/FS.hpp @@ -24,7 +24,7 @@ namespace Aurora::IO::FS AUKN_SYM bool WriteFile(const AuString &path, const void *data, AuUInt length); AUKN_SYM bool WriteString(const AuString &path, const AuString &str); - AUKN_SYM bool ReadFile(const AuString &path, AuList &buffer); + AUKN_SYM bool ReadFile(const AuString &path, Memory::ByteBuffer &buffer); AUKN_SYM bool ReadString(const AuString &path, AuString &buffer); AUKN_SYM bool FileExists(const AuString &path); @@ -37,6 +37,7 @@ namespace Aurora::IO::FS AUKN_SYM bool Relink(const AuString &src, const AuString &dest); AUKN_SYM bool Copy(const AuString &src, const AuString &dest); + } #include "IFileStream.hpp" diff --git a/Source/Crypto/RSA/RSAPrivate.cpp b/Source/Crypto/RSA/RSAPrivate.cpp index 130fd0e1..92dbf538 100644 --- a/Source/Crypto/RSA/RSAPrivate.cpp +++ b/Source/Crypto/RSA/RSAPrivate.cpp @@ -94,7 +94,7 @@ namespace Aurora::Crypto::RSA return true; } - bool PrivateRSA::Decrypt(const Memory::MemoryViewRead &payload, + bool PrivateRSA::Decrypt(const AuMemoryViewRead &payload, EPaddingType type, AuByteBuffer &out) { diff --git a/Source/IO/FS/FS.Generic.cpp b/Source/IO/FS/FS.Generic.cpp index b3dc5af2..61557f38 100644 --- a/Source/IO/FS/FS.Generic.cpp +++ b/Source/IO/FS/FS.Generic.cpp @@ -46,7 +46,7 @@ namespace Aurora::IO::FS return bytesWritten == length; } - AUKN_SYM bool ReadFile(const AuString &path, Memory::ByteBuffer &buffer) + AUKN_SYM bool ReadFile(const AuString &path, AuByteBuffer &buffer) { auto file = fopen(NormalizePathRet(path).c_str(), "rb"); if (!file) diff --git a/Source/IO/FS/FS.NT.cpp b/Source/IO/FS/FS.NT.cpp index aa3fe181..25bfe677 100644 --- a/Source/IO/FS/FS.NT.cpp +++ b/Source/IO/FS/FS.NT.cpp @@ -95,7 +95,7 @@ namespace Aurora::IO::FS return status; } - AUKN_SYM bool ReadFile(const AuString &path, AuList &buffer) + AUKN_SYM bool ReadFile(const AuString &path, AuByteBuffer &buffer) { std::wstring win32Path; LARGE_INTEGER length; diff --git a/Source/IO/FS/FS.cpp b/Source/IO/FS/FS.cpp index a967a5e7..4dec8227 100644 --- a/Source/IO/FS/FS.cpp +++ b/Source/IO/FS/FS.cpp @@ -212,7 +212,7 @@ namespace Aurora::IO::FS AUKN_SYM bool ReadString(const AuString &path, AuString &buffer) { - AuList fileBuffer; + AuByteBuffer fileBuffer; if (!ReadFile(path, fileBuffer)) { diff --git a/Source/IO/FS/FileStream.NT.cpp b/Source/IO/FS/FileStream.NT.cpp index c17d8975..b7e03213 100644 --- a/Source/IO/FS/FileStream.NT.cpp +++ b/Source/IO/FS/FileStream.NT.cpp @@ -130,7 +130,7 @@ namespace Aurora::IO::FS return true; } - bool WinFileStream::Write(const Memory::MemoryViewStreamRead & parameters) + bool WinFileStream::Write(const Memory::MemoryViewStreamRead ¶meters) { if (handle_ == INVALID_HANDLE_VALUE) { diff --git a/Source/Loop/Loop.NT.cpp b/Source/Loop/Loop.NT.cpp index 78cac163..2fc938ba 100644 --- a/Source/Loop/Loop.NT.cpp +++ b/Source/Loop/Loop.NT.cpp @@ -57,7 +57,7 @@ namespace Aurora::Loop DWORD ret; if (isWinLoop) { - ret = ::MsgWaitForMultipleObjectsEx(handleArray.size(), handleArray.data(), timeout ? timeout : INFINITE, QS_ALLPOSTMESSAGE | QS_ALLINPUT | QS_ALLEVENTS, MWMO_INPUTAVAILABLE); + ret = ::MsgWaitForMultipleObjectsEx(handleArray.size(), handleArray.data(), timeout ? timeout : INFINITE, QS_ALLPOSTMESSAGE | QS_ALLINPUT | QS_ALLEVENTS, MWMO_INPUTAVAILABLE | MWMO_ALERTABLE); } else {