Merge pull request #8733 from JosJuice/di-baten-kaitos
Adjust s_DIMAR/s_DILENGTH behavior (fixes Baten Kaitos music)
This commit is contained in:
commit
85a8325701
|
@ -1233,8 +1233,17 @@ void SetHighError(u32 high_error)
|
|||
void FinishExecutingCommand(ReplyType reply_type, DIInterruptType interrupt_type, s64 cycles_late,
|
||||
const std::vector<u8>& data)
|
||||
{
|
||||
s_DIMAR += s_DILENGTH;
|
||||
s_DILENGTH = 0;
|
||||
// The data parameter contains the requested data iff this was called from DVDThread, and is
|
||||
// empty otherwise. DVDThread is the only source of ReplyType::NoReply and ReplyType::DTK.
|
||||
|
||||
u32 transfer_size = 0;
|
||||
if (reply_type == ReplyType::NoReply)
|
||||
transfer_size = static_cast<u32>(data.size());
|
||||
else if (reply_type == ReplyType::Interrupt || reply_type == ReplyType::IOS)
|
||||
transfer_size = s_DILENGTH;
|
||||
|
||||
s_DIMAR += transfer_size;
|
||||
s_DILENGTH -= transfer_size;
|
||||
|
||||
switch (reply_type)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue