mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix variable names in RTech::OpenFile
This commit is contained in:
parent
1cd0ae5c87
commit
946da4b2cc
@ -629,16 +629,16 @@ int32_t RTech::OpenFile(const char* szFilePath, void* unused, int64_t* fileSizeO
|
|||||||
}
|
}
|
||||||
|
|
||||||
AcquireSRWLockExclusive(reinterpret_cast<PSRWLOCK>(&*g_pPakFileSlotLock));
|
AcquireSRWLockExclusive(reinterpret_cast<PSRWLOCK>(&*g_pPakFileSlotLock));
|
||||||
const int32_t pakIdx = RTech_FindFreeSlotInFiles(s_pFileArray);
|
const int32_t fileIdx = RTech_FindFreeSlotInFiles(s_pFileArray);
|
||||||
ReleaseSRWLockExclusive(reinterpret_cast<PSRWLOCK>(&*g_pPakFileSlotLock));
|
ReleaseSRWLockExclusive(reinterpret_cast<PSRWLOCK>(&*g_pPakFileSlotLock));
|
||||||
|
|
||||||
const int32_t pakHandleIdx = pakIdx & 0x3FF; // Something with ArraySize.
|
const int32_t fileHandleIdx = fileIdx & 0x3FF; // Something with ArraySize.
|
||||||
|
|
||||||
m_FileHandles->self[pakHandleIdx].m_nFileNumber = pakIdx;
|
m_FileHandles->self[fileHandleIdx].m_nFileNumber = fileIdx;
|
||||||
m_FileHandles->self[pakHandleIdx].m_hFileHandle = hFile;
|
m_FileHandles->self[fileHandleIdx].m_hFileHandle = hFile;
|
||||||
m_FileHandles->self[pakHandleIdx].m_nCurOfs = 1;
|
m_FileHandles->self[fileHandleIdx].m_nCurOfs = 1;
|
||||||
|
|
||||||
return pakIdx;
|
return fileIdx;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user