1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-12-22 10:22:08 +00:00

haze: pretend to be able to write MTP server code

This commit is contained in:
Liam 2023-10-16 17:31:09 -04:00
parent edb4e2ea56
commit 7f4450f930

View file

@ -257,10 +257,21 @@ namespace haze {
return property_code == -1 || code == property_code;
};
/* Determine how many output elements we will report. */
u32 num_output_elements = 0;
for (const auto obj_property : SupportedObjectProperties) {
if (ShouldIncludeProperty(obj_property)) {
num_output_elements++;
}
}
/* Begin writing the requested object properties. */
PtpDataBuilder db(m_buffers->usb_bulk_write_buffer, std::addressof(m_usb_server));
R_TRY(db.WriteVariableLengthData(m_request_header, [&] {
/* Report the number of elements. */
R_TRY(db.Add(num_output_elements));
for (const auto obj_property : SupportedObjectProperties) {
if (!ShouldIncludeProperty(obj_property)) {
continue;