mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
BTReal: Use FromThread::ANY for USB transfer replies
libusb transfer callbacks might be called immediately during transfer submission in some cases. (libusb doesn't even specify what thread the callback is invoked on.) In other words, it is possible to reach the transfer callback from the CPU thread, and not just from the USB event handling thread. So CoreTiming::FromThread::NON_CPU is incorrect and should instead be ANY.
This commit is contained in:
parent
cf60a9a7f7
commit
e85fa26768
@ -592,8 +592,7 @@ void BluetoothReal::HandleCtrlTransfer(libusb_transfer* tr)
|
||||
}
|
||||
const auto& command = m_current_transfers.at(tr).command;
|
||||
command->FillBuffer(libusb_control_transfer_get_data(tr), tr->actual_length);
|
||||
m_ios.EnqueueIPCReply(command->ios_request, tr->actual_length, 0,
|
||||
CoreTiming::FromThread::NON_CPU);
|
||||
m_ios.EnqueueIPCReply(command->ios_request, tr->actual_length, 0, CoreTiming::FromThread::ANY);
|
||||
m_current_transfers.erase(tr);
|
||||
}
|
||||
|
||||
@ -641,8 +640,7 @@ void BluetoothReal::HandleBulkOrIntrTransfer(libusb_transfer* tr)
|
||||
|
||||
const auto& command = m_current_transfers.at(tr).command;
|
||||
command->FillBuffer(tr->buffer, tr->actual_length);
|
||||
m_ios.EnqueueIPCReply(command->ios_request, tr->actual_length, 0,
|
||||
CoreTiming::FromThread::NON_CPU);
|
||||
m_ios.EnqueueIPCReply(command->ios_request, tr->actual_length, 0, CoreTiming::FromThread::ANY);
|
||||
m_current_transfers.erase(tr);
|
||||
}
|
||||
} // namespace IOS::HLE::Device
|
||||
|
Loading…
x
Reference in New Issue
Block a user