fix: 4J_Storage lib can now be used in game

This commit is contained in:
Patoke
2026-03-01 06:17:10 -03:00
parent c94a0e90c0
commit 69acc2196d
3 changed files with 5 additions and 7 deletions
+2 -1
View File
@@ -9,9 +9,10 @@ XCONTENT_DATA& CDLC::GetDLC(DWORD dw)
CDLC::CDLC(void) : m_vInstalledDLCs(), m_szMountPath(), m_vDLCDriveMappings()
{
m_iHasNewInstalledDLCs = 0;
m_iHasNewInstalledDLCs = false;
dword0 = 0;
dwordC0 = 0;
m_iHasNewMountedDLCs = false; // @Patoke fix
ZeroMemory(m_szDLCProductCode, sizeof(m_szDLCProductCode));
ZeroMemory(m_szProductUpgradeKey, sizeof(m_szProductUpgradeKey));
+1 -4
View File
@@ -49,10 +49,7 @@ public:
std::string m_szMountPath;
DWORD m_uiCurrentMappedDLC;
DWORD dword94;
char* m_szPackageRoot;
BYTE gapA0[16];
DWORD dwordB0;
BYTE gapC0[12];
char m_szPackageRoot[40];
DWORD dwordC0;
std::vector<DriveMapping> m_vDLCDriveMappings;
char m_szDLCProductCode[16];
+2 -2
View File
@@ -175,7 +175,7 @@ C4JStorage::ESaveGameState CSaveGame::LoadSaveData(PSAVE_INFO pSaveInfo, int(*Fu
{
DWORD bytesRead = 0;
BOOL res = ReadFile(h, m_pSaveData, m_uiSaveSize, &bytesRead, 0);
_ASSERT(!res || bytesRead != m_uiSaveSize);
_ASSERT(res && bytesRead == m_uiSaveSize);
CloseHandle(h);
success = true;
}
@@ -254,7 +254,7 @@ C4JStorage::ESaveGameState CSaveGame::SaveSaveData(int(*Func)(LPVOID, const bool
DWORD bytesWritten = 0;
BOOL res = WriteFile(h, m_pSaveData, m_uiSaveSize, &bytesWritten, 0);
_ASSERT(!res || bytesWritten != m_uiSaveSize);
_ASSERT(res && bytesWritten == m_uiSaveSize);
CloseHandle(h);