summaryrefslogtreecommitdiff
path: root/src/class/mtp/mtp_device.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-09-26 11:51:09 +0700
committerhathach <[email protected]>2025-09-26 11:51:09 +0700
commite92262eb5cdc35dfc6019c97d1b9166be0f5e62f (patch)
tree8d7084397232e86ef2ac64dd3d97dc19c25326d6 /src/class/mtp/mtp_device.c
parente4f7fcf7ec4239aff6193a8d71cd0e8ce94024dd (diff)
fix more ci build
Diffstat (limited to 'src/class/mtp/mtp_device.c')
-rw-r--r--src/class/mtp/mtp_device.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/class/mtp/mtp_device.c b/src/class/mtp/mtp_device.c
index 61b1c9613..b3d982323 100644
--- a/src/class/mtp/mtp_device.c
+++ b/src/class/mtp/mtp_device.c
@@ -424,14 +424,10 @@ void process_cmd(mtpd_interface_t* p_mtp, tud_mtp_cb_data_t* cb_data) {
.standard_version = 100,
.mtp_vendor_extension_id = 6, // MTP specs say 0xFFFFFFFF but libMTP check for value 6
.mtp_version = 100,
-#ifdef CFG_TUD_MTP_DEVICEINFO_EXTENSIONS
.mtp_extensions = {
.count = sizeof(CFG_TUD_MTP_DEVICEINFO_EXTENSIONS),
.utf16 = { 0 }
},
-#else
- .mtp_extensions = 0,
-#endif
.functional_mode = 0x0000,
.supported_operations = {
.count = TU_ARGS_NUM(CFG_TUD_MTP_DEVICEINFO_SUPPORTED_OPERATIONS),
@@ -454,11 +450,11 @@ void process_cmd(mtpd_interface_t* p_mtp, tud_mtp_cb_data_t* cb_data) {
.arr = { CFG_TUD_MTP_DEVICEINFO_PLAYBACK_FORMATS }
}
};
-#ifdef CFG_TUD_MTP_DEVICEINFO_EXTENSIONS
+
for (uint8_t i=0; i < dev_info.mtp_extensions.count; i++) {
dev_info.mtp_extensions.utf16[i] = (uint16_t)CFG_TUD_MTP_DEVICEINFO_EXTENSIONS[i];
}
-#endif
+
mtp_container_add_raw(&cb_data->io_container, &dev_info, sizeof(tud_mtp_device_info_t));
break;
}