Implement/match MxStreamer::DeleteObject (#370)

This commit is contained in:
Christian Semmler 2023-12-26 21:17:20 -05:00 committed by GitHub
parent 6e947c3789
commit ac6eb28dc4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,7 +142,7 @@ MxResult MxStreamer::FUN_100b99b0(MxDSAction* p_action)
return FAILURE; return FAILURE;
} }
// STUB: LEGO1 0x100b99f0 // FUNCTION: LEGO1 0x100b99f0
MxResult MxStreamer::DeleteObject(MxDSAction* p_dsAction) MxResult MxStreamer::DeleteObject(MxDSAction* p_dsAction)
{ {
MxDSAction tempAction; MxDSAction tempAction;
@ -156,8 +156,16 @@ MxResult MxStreamer::DeleteObject(MxDSAction* p_dsAction)
tempAction.SetUnknown24(p_dsAction->GetUnknown24()); tempAction.SetUnknown24(p_dsAction->GetUnknown24());
} }
// TODO: remove action from list MxResult result = FAILURE;
return FAILURE; for (list<MxStreamController*>::iterator it = m_openStreams.begin(); it != m_openStreams.end(); it++) {
const char* id = p_dsAction->GetAtomId().GetInternal();
if (!id || id == (*it)->GetAtom().GetInternal()) {
tempAction.SetAtomId((*it)->GetAtom());
result = (*it)->VTable0x24(&tempAction);
}
}
return result;
} }
// FUNCTION: LEGO1 0x100b9b30 // FUNCTION: LEGO1 0x100b9b30