mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 21:01:37 +00:00
Fix a few incorrect data types.
This commit is contained in:
parent
82f6548f8d
commit
7d41a3dfc5
3 changed files with 17 additions and 18 deletions
|
|
@ -150,7 +150,7 @@ inline void CloseKernelObject(XDISPATCHER_HEADER& header)
|
||||||
DestroyKernelObject(header.WaitListHead.Blink);
|
DestroyKernelObject(header.WaitListHead.Blink);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t GuestTimeoutToMilliseconds(be<uint64_t>* timeout)
|
uint32_t GuestTimeoutToMilliseconds(be<int64_t>* timeout)
|
||||||
{
|
{
|
||||||
return timeout ? (*timeout * -1) / 10000 : INFINITE;
|
return timeout ? (*timeout * -1) / 10000 : INFINITE;
|
||||||
}
|
}
|
||||||
|
|
@ -228,8 +228,7 @@ void XamContentDelete()
|
||||||
LOG_UTILITY("!!! STUB !!!");
|
LOG_UTILITY("!!! STUB !!!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t XamContentGetCreator(uint32_t userIndex, const XCONTENT_DATA* contentData, be<uint32_t>* isCreator, be<uint64_t>* xuid, XXOVERLAPPED* overlapped)
|
||||||
uint32_t XamContentGetCreator(uint32_t userIndex, const XCONTENT_DATA* contentData, uint32_t* isCreator, be<uint64_t>* xuid, XXOVERLAPPED* overlapped)
|
|
||||||
{
|
{
|
||||||
if (isCreator)
|
if (isCreator)
|
||||||
*isCreator = true;
|
*isCreator = true;
|
||||||
|
|
@ -381,7 +380,7 @@ uint32_t FscSetCacheElementCount()
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t NtWaitForSingleObjectEx(uint32_t Handle, uint32_t WaitMode, uint32_t Alertable, be<uint64_t>* Timeout)
|
uint32_t NtWaitForSingleObjectEx(uint32_t Handle, uint32_t WaitMode, uint32_t Alertable, be<int64_t>* Timeout)
|
||||||
{
|
{
|
||||||
uint32_t timeout = GuestTimeoutToMilliseconds(Timeout);
|
uint32_t timeout = GuestTimeoutToMilliseconds(Timeout);
|
||||||
assert(timeout == 0 || timeout == INFINITE);
|
assert(timeout == 0 || timeout == INFINITE);
|
||||||
|
|
@ -541,7 +540,7 @@ uint32_t RtlUnicodeToMultiByteN(char* MultiByteString, uint32_t MaxBytesInMultiB
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t KeDelayExecutionThread(uint32_t WaitMode, bool Alertable, be<uint64_t>* Timeout)
|
uint32_t KeDelayExecutionThread(uint32_t WaitMode, bool Alertable, be<int64_t>* Timeout)
|
||||||
{
|
{
|
||||||
// We don't do async file reads.
|
// We don't do async file reads.
|
||||||
if (Alertable)
|
if (Alertable)
|
||||||
|
|
@ -981,7 +980,7 @@ bool KeResetEvent(XKEVENT* pEvent)
|
||||||
return QueryKernelObject<Event>(*pEvent)->Reset();
|
return QueryKernelObject<Event>(*pEvent)->Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t KeWaitForSingleObject(XDISPATCHER_HEADER* Object, uint32_t WaitReason, uint32_t WaitMode, bool Alertable, be<uint64_t>* Timeout)
|
uint32_t KeWaitForSingleObject(XDISPATCHER_HEADER* Object, uint32_t WaitReason, uint32_t WaitMode, bool Alertable, be<int64_t>* Timeout)
|
||||||
{
|
{
|
||||||
const uint32_t timeout = GuestTimeoutToMilliseconds(Timeout);
|
const uint32_t timeout = GuestTimeoutToMilliseconds(Timeout);
|
||||||
assert(timeout == INFINITE);
|
assert(timeout == INFINITE);
|
||||||
|
|
@ -1255,7 +1254,7 @@ void NtQueryFullAttributesFile()
|
||||||
LOG_UTILITY("!!! STUB !!!");
|
LOG_UTILITY("!!! STUB !!!");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t RtlMultiByteToUnicodeN(wchar_t* UnicodeString, uint32_t MaxBytesInUnicodeString, uint16_t* BytesInUnicodeString, const char* MultiByteString, uint32_t BytesInMultiByteString)
|
uint32_t RtlMultiByteToUnicodeN(wchar_t* UnicodeString, uint32_t MaxBytesInUnicodeString, be<uint32_t>* BytesInUnicodeString, const char* MultiByteString, uint32_t BytesInMultiByteString)
|
||||||
{
|
{
|
||||||
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
|
std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
|
||||||
|
|
||||||
|
|
@ -1317,7 +1316,7 @@ uint32_t NtCreateSemaphore(be<uint32_t>* Handle, XOBJECT_ATTRIBUTES* ObjectAttri
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t NtReleaseSemaphore(Semaphore* Handle, uint32_t ReleaseCount, uint32_t* PreviousCount)
|
uint32_t NtReleaseSemaphore(Semaphore* Handle, uint32_t ReleaseCount, int32_t* PreviousCount)
|
||||||
{
|
{
|
||||||
uint32_t previousCount;
|
uint32_t previousCount;
|
||||||
Handle->Release(ReleaseCount, &previousCount);
|
Handle->Release(ReleaseCount, &previousCount);
|
||||||
|
|
@ -1481,7 +1480,7 @@ void NetDll_XNetGetTitleXnAddr()
|
||||||
LOG_UTILITY("!!! STUB !!!");
|
LOG_UTILITY("!!! STUB !!!");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t KeWaitForMultipleObjects(uint32_t Count, xpointer<XDISPATCHER_HEADER>* Objects, uint32_t WaitType, uint32_t WaitReason, uint32_t WaitMode, uint32_t Alertable, be<uint64_t>* Timeout)
|
uint32_t KeWaitForMultipleObjects(uint32_t Count, xpointer<XDISPATCHER_HEADER>* Objects, uint32_t WaitType, uint32_t WaitReason, uint32_t WaitMode, uint32_t Alertable, be<int64_t>* Timeout)
|
||||||
{
|
{
|
||||||
// FIXME: This function is only accounting for events.
|
// FIXME: This function is only accounting for events.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,9 +157,9 @@ uint32_t XReadFile
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t XSetFilePointer(FileHandle* hFile, uint32_t lDistanceToMove, be<uint32_t>* lpDistanceToMoveHigh, uint32_t dwMoveMethod)
|
uint32_t XSetFilePointer(FileHandle* hFile, int32_t lDistanceToMove, be<int32_t>* lpDistanceToMoveHigh, uint32_t dwMoveMethod)
|
||||||
{
|
{
|
||||||
uint32_t distanceToMoveHigh = lpDistanceToMoveHigh ? lpDistanceToMoveHigh->get() : 0;
|
int32_t distanceToMoveHigh = lpDistanceToMoveHigh ? lpDistanceToMoveHigh->get() : 0;
|
||||||
std::streamoff streamOffset = lDistanceToMove + (std::streamoff(distanceToMoveHigh) << 32U);
|
std::streamoff streamOffset = lDistanceToMove + (std::streamoff(distanceToMoveHigh) << 32U);
|
||||||
std::fstream::seekdir streamSeekDir = {};
|
std::fstream::seekdir streamSeekDir = {};
|
||||||
switch (dwMoveMethod)
|
switch (dwMoveMethod)
|
||||||
|
|
@ -187,12 +187,12 @@ uint32_t XSetFilePointer(FileHandle* hFile, uint32_t lDistanceToMove, be<uint32_
|
||||||
|
|
||||||
std::streampos streamPos = hFile->stream.tellg();
|
std::streampos streamPos = hFile->stream.tellg();
|
||||||
if (lpDistanceToMoveHigh != nullptr)
|
if (lpDistanceToMoveHigh != nullptr)
|
||||||
*lpDistanceToMoveHigh = uint32_t(streamPos >> 32U);
|
*lpDistanceToMoveHigh = int32_t(streamPos >> 32U);
|
||||||
|
|
||||||
return uint32_t(streamPos);
|
return uint32_t(streamPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t XSetFilePointerEx(FileHandle* hFile, uint32_t lDistanceToMove, LARGE_INTEGER* lpNewFilePointer, uint32_t dwMoveMethod)
|
uint32_t XSetFilePointerEx(FileHandle* hFile, int32_t lDistanceToMove, LARGE_INTEGER* lpNewFilePointer, uint32_t dwMoveMethod)
|
||||||
{
|
{
|
||||||
std::fstream::seekdir streamSeekDir = {};
|
std::fstream::seekdir streamSeekDir = {};
|
||||||
switch (dwMoveMethod)
|
switch (dwMoveMethod)
|
||||||
|
|
@ -220,7 +220,7 @@ uint32_t XSetFilePointerEx(FileHandle* hFile, uint32_t lDistanceToMove, LARGE_IN
|
||||||
|
|
||||||
if (lpNewFilePointer != nullptr)
|
if (lpNewFilePointer != nullptr)
|
||||||
{
|
{
|
||||||
lpNewFilePointer->QuadPart = ByteSwap(uint64_t(hFile->stream.tellg()));
|
lpNewFilePointer->QuadPart = ByteSwap(int64_t(hFile->stream.tellg()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
||||||
|
|
@ -44,13 +44,13 @@
|
||||||
typedef union _LARGE_INTEGER {
|
typedef union _LARGE_INTEGER {
|
||||||
struct {
|
struct {
|
||||||
uint32_t LowPart;
|
uint32_t LowPart;
|
||||||
uint32_t HighPart;
|
int32_t HighPart;
|
||||||
} DUMMYSTRUCTNAME;
|
};
|
||||||
struct {
|
struct {
|
||||||
uint32_t LowPart;
|
uint32_t LowPart;
|
||||||
uint32_t HighPart;
|
int32_t HighPart;
|
||||||
} u;
|
} u;
|
||||||
uint64_t QuadPart;
|
int64_t QuadPart;
|
||||||
} LARGE_INTEGER;
|
} LARGE_INTEGER;
|
||||||
|
|
||||||
typedef struct _FILETIME
|
typedef struct _FILETIME
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue