diff --git a/btdrv-mitm/source/bluetooth/bluetooth_ble.cpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_ble.cpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_ble.cpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_ble.cpp diff --git a/btdrv-mitm/source/bluetooth/bluetooth_ble.hpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_ble.hpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_ble.hpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_ble.hpp diff --git a/btdrv-mitm/source/bluetooth/bluetooth_circular_buffer.cpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_circular_buffer.cpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_circular_buffer.cpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_circular_buffer.cpp diff --git a/btdrv-mitm/source/bluetooth/bluetooth_circular_buffer.hpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_circular_buffer.hpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_circular_buffer.hpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_circular_buffer.hpp diff --git a/btdrv-mitm/source/bluetooth/bluetooth_core.cpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_core.cpp similarity index 97% rename from btdrv-mitm/source/bluetooth/bluetooth_core.cpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_core.cpp index c75181a..6d584c5 100644 --- a/btdrv-mitm/source/bluetooth/bluetooth_core.cpp +++ b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_core.cpp @@ -84,17 +84,17 @@ namespace ams::bluetooth::core { if (program_id == ncm::SystemProgramId::Btm) { switch (g_current_event_type) { case BluetoothEvent_DeviceFound: - if (controller::IsGamepad(&event_data->deviceFound.cod) && !controller::IsOfficialSwitchControllerName(event_data->deviceFound.name)) { + if (controller::IsGamepad(&event_data->deviceFound.cod) && !controller::IsOfficialSwitchControllerName(event_data->deviceFound.name, sizeof(BluetoothName))) { std::strncpy(event_data->deviceFound.name, controller::pro_controller_name, sizeof(BluetoothName) - 1); } break; case BluetoothEvent_PinRequest: - if (!controller::IsOfficialSwitchControllerName(event_data->pinReply.name)) { + if (!controller::IsOfficialSwitchControllerName(event_data->pinReply.name, sizeof(BluetoothName))) { std::strncpy(event_data->pinReply.name, controller::pro_controller_name, sizeof(BluetoothName) - 1); } break; case BluetoothEvent_SspRequest: - if (!controller::IsOfficialSwitchControllerName(event_data->sspReply.name)) { + if (!controller::IsOfficialSwitchControllerName(event_data->sspReply.name, sizeof(BluetoothName))) { std::strncpy(event_data->sspReply.name, controller::pro_controller_name, sizeof(BluetoothName) - 1); } break; diff --git a/btdrv-mitm/source/bluetooth/bluetooth_core.hpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_core.hpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_core.hpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_core.hpp diff --git a/btdrv-mitm/source/bluetooth/bluetooth_events.cpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_events.cpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_events.cpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_events.cpp diff --git a/btdrv-mitm/source/bluetooth/bluetooth_events.hpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_events.hpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_events.hpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_events.hpp diff --git a/btdrv-mitm/source/bluetooth/bluetooth_hid.cpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_hid.cpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_hid.cpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_hid.cpp diff --git a/btdrv-mitm/source/bluetooth/bluetooth_hid.hpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_hid.hpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_hid.hpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_hid.hpp diff --git a/btdrv-mitm/source/bluetooth/bluetooth_hid_report.cpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_hid_report.cpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_hid_report.cpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_hid_report.cpp diff --git a/btdrv-mitm/source/bluetooth/bluetooth_hid_report.hpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_hid_report.hpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_hid_report.hpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_hid_report.hpp diff --git a/btdrv-mitm/source/bluetooth/bluetooth_types.hpp b/btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_types.hpp similarity index 100% rename from btdrv-mitm/source/bluetooth/bluetooth_types.hpp rename to btdrv-mitm/source/btdrv_mitm/bluetooth/bluetooth_types.hpp diff --git a/btdrv-mitm/source/btdrv_mitm_flags.cpp b/btdrv-mitm/source/btdrv_mitm/btdrv_mitm_flags.cpp similarity index 100% rename from btdrv-mitm/source/btdrv_mitm_flags.cpp rename to btdrv-mitm/source/btdrv_mitm/btdrv_mitm_flags.cpp diff --git a/btdrv-mitm/source/btdrv_mitm_flags.hpp b/btdrv-mitm/source/btdrv_mitm/btdrv_mitm_flags.hpp similarity index 100% rename from btdrv-mitm/source/btdrv_mitm_flags.hpp rename to btdrv-mitm/source/btdrv_mitm/btdrv_mitm_flags.hpp diff --git a/btdrv-mitm/source/btdrv_mitm_service.cpp b/btdrv-mitm/source/btdrv_mitm/btdrv_mitm_service.cpp similarity index 100% rename from btdrv-mitm/source/btdrv_mitm_service.cpp rename to btdrv-mitm/source/btdrv_mitm/btdrv_mitm_service.cpp diff --git a/btdrv-mitm/source/btdrv_mitm_service.hpp b/btdrv-mitm/source/btdrv_mitm/btdrv_mitm_service.hpp similarity index 100% rename from btdrv-mitm/source/btdrv_mitm_service.hpp rename to btdrv-mitm/source/btdrv_mitm/btdrv_mitm_service.hpp diff --git a/btdrv-mitm/source/btdrv_shim.c b/btdrv-mitm/source/btdrv_mitm/btdrv_shim.c similarity index 100% rename from btdrv-mitm/source/btdrv_shim.c rename to btdrv-mitm/source/btdrv_mitm/btdrv_shim.c diff --git a/btdrv-mitm/source/btdrv_shim.h b/btdrv-mitm/source/btdrv_mitm/btdrv_shim.h similarity index 100% rename from btdrv-mitm/source/btdrv_shim.h rename to btdrv-mitm/source/btdrv_mitm/btdrv_shim.h