mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-08 13:11:49 +00:00
haze: pretend to be able to write MTP server code
This commit is contained in:
parent
edb4e2ea56
commit
7f4450f930
1 changed files with 11 additions and 0 deletions
|
@ -257,10 +257,21 @@ namespace haze {
|
||||||
return property_code == -1 || code == property_code;
|
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. */
|
/* Begin writing the requested object properties. */
|
||||||
PtpDataBuilder db(m_buffers->usb_bulk_write_buffer, std::addressof(m_usb_server));
|
PtpDataBuilder db(m_buffers->usb_bulk_write_buffer, std::addressof(m_usb_server));
|
||||||
|
|
||||||
R_TRY(db.WriteVariableLengthData(m_request_header, [&] {
|
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) {
|
for (const auto obj_property : SupportedObjectProperties) {
|
||||||
if (!ShouldIncludeProperty(obj_property)) {
|
if (!ShouldIncludeProperty(obj_property)) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue