diff --git a/btdrv-mitm/source/bluetooth/bluetooth_hid_report.cpp b/btdrv-mitm/source/bluetooth/bluetooth_hid_report.cpp index c3a8adb..4bbccf9 100644 --- a/btdrv-mitm/source/bluetooth/bluetooth_hid_report.cpp +++ b/btdrv-mitm/source/bluetooth/bluetooth_hid_report.cpp @@ -96,9 +96,6 @@ namespace ams::bluetooth::hid::report { void Finalize(void) { os::DestroyThread(&g_eventHandlerThread); - //if (hos::GetVersion() < hos::Version_7_0_0) - //delete g_fakeBuffer; - os::DestroySystemEvent(&g_btHidReportSystemEventUser); os::DestroySystemEvent(&g_btHidReportSystemEventFwd); @@ -116,15 +113,9 @@ namespace ams::bluetooth::hid::report { Result InitializeReportBuffer(void) { BTDRV_LOG_FMT("btdrv-mitm: InitializeReportBuffer"); - // Todo: maybe just create shared memory for all fw? - if (hos::GetVersion() < hos::Version_7_0_0) { - g_fakeBuffer = new CircularBuffer(); - } - else { - R_TRY(shmemCreate(&g_fakeBtShmem, BLUETOOTH_SHAREDMEM_SIZE, Perm_Rw, Perm_Rw)); - R_TRY(shmemMap(&g_fakeBtShmem)); - g_fakeBuffer = reinterpret_cast(shmemGetAddr(&g_fakeBtShmem)); - } + R_TRY(shmemCreate(&g_fakeBtShmem, BLUETOOTH_SHAREDMEM_SIZE, Perm_Rw, Perm_Rw)); + R_TRY(shmemMap(&g_fakeBtShmem)); + g_fakeBuffer = reinterpret_cast(shmemGetAddr(&g_fakeBtShmem)); g_fakeBuffer->Initialize("HID Report"); g_fakeBuffer->type = bluetooth::CircularBufferType_HidReport;