btdrv-mitm: only initialise fake shared memory on fw >= 7.0.0

This commit is contained in:
ndeadly 2020-06-15 14:13:17 +02:00
parent a2654fd250
commit 8acb76913b

View file

@ -17,8 +17,11 @@ namespace ams::mitm::btdrv {
if (!bluetooth::core::IsInitialized()) {
Handle handle = INVALID_HANDLE;
R_TRY(btdrvInitializeBluetoothFwd(this->forward_service.get(), &handle));
R_TRY(bluetooth::hid::report::InitializeFakeSharedMemory());
R_TRY(bluetooth::core::Initialize(handle));
if (hos::GetVersion() >= hos::Version_7_0_0)
R_TRY(bluetooth::hid::report::InitializeFakeSharedMemory());
//bluetooth::events::AttachWaitHolder(BtdrvEventType_BluetoothCore);
out_handle.SetValue(os::GetReadableHandleOfSystemEvent(bluetooth::core::GetForwardEvent()));
} else {