Fix loading save states with bluetooth passthrough

When a save state is loaded, the IOS device serving bluetooth
is cast as BluetoothEmuDevice. If, however, a real Wiimote
with BT passthrough is used, this caused the game to crash.
Now the proper device class is used.
This commit is contained in:
michaelszubartowicz 2021-03-14 01:45:20 +01:00 committed by Léo Lam
parent e6d8af3188
commit 2eb6e21a61
No known key found for this signature in database
GPG key ID: 0DF30F9081000741

View file

@ -53,6 +53,9 @@ void UpdateSource(unsigned int index)
if (!ios)
return;
if (s_wiimote_sources[index] != WiimoteSource::Emulated)
return;
const auto bluetooth = std::static_pointer_cast<IOS::HLE::BluetoothEmuDevice>(
ios->GetDeviceByName("/dev/usb/oh1/57e/305"));
if (!bluetooth)