Match MxDiskStreamProvider::VTable0x20

This commit is contained in:
Christian Semmler 2023-12-26 14:59:59 -05:00
parent 55f2674ea4
commit f84abd61af
2 changed files with 12 additions and 16 deletions

View File

@ -81,27 +81,26 @@ MxResult MxDiskStreamProvider::SetResourceToGet(MxStreamController* p_resource)
void MxDiskStreamProvider::VTable0x20(MxDSAction* p_action) void MxDiskStreamProvider::VTable0x20(MxDSAction* p_action)
{ {
MxDSStreamingAction* action; MxDSStreamingAction* action;
if (p_action->GetObjectId() == -1) { if (p_action->GetObjectId() == -1) {
m_unk0x35 = 1; m_unk0x35 = FALSE;
do { do {
action = NULL;
{ {
MxAutoLocker lock(&m_criticalSection); MxAutoLocker lock(&m_criticalSection);
action = NULL; m_list.PopFrontStreamingAction(action);
if (m_list.size()) {
m_list.pop_front();
}
} }
if (action == NULL) { if (!action)
return; return;
}
if (action->GetUnknowna0()->GetWriteOffset() < 0x20000) { if (action->GetUnknowna0()->GetWriteOffset() < 0x20000)
g_unk0x10102878--; g_unk0x10102878--;
}
((MxDiskStreamController*) m_pLookup)->FUN_100c8670(action); ((MxDiskStreamController*) m_pLookup)->FUN_100c8670(action);
} while (action != NULL); } while (action);
} }
else { else {
do { do {
@ -110,16 +109,14 @@ void MxDiskStreamProvider::VTable0x20(MxDSAction* p_action)
action = (MxDSStreamingAction*) m_list.Find(p_action, TRUE); action = (MxDSStreamingAction*) m_list.Find(p_action, TRUE);
} }
if (action == NULL) { if (!action)
return; return;
}
if (action->GetUnknowna0()->GetWriteOffset() < 0x20000) { if (action->GetUnknowna0()->GetWriteOffset() < 0x20000)
g_unk0x10102878--; g_unk0x10102878--;
}
((MxDiskStreamController*) m_pLookup)->FUN_100c8670(action); ((MxDiskStreamController*) m_pLookup)->FUN_100c8670(action);
} while (action != NULL); } while (action);
} }
} }

View File

@ -46,7 +46,6 @@ class MxDSChunk : public MxCore {
inline MxU16 GetFlags() { return m_flags; } inline MxU16 GetFlags() { return m_flags; }
inline undefined4 GetObjectId() { return m_objectId; } inline undefined4 GetObjectId() { return m_objectId; }
inline MxLong GetTime() { return m_time; } inline MxLong GetTime() { return m_time; }
inline MxLong& GetTimeRef() { return m_time; }
inline MxU32 GetLength() { return m_length; } inline MxU32 GetLength() { return m_length; }
inline MxU8* GetData() { return m_data; } inline MxU8* GetData() { return m_data; }