htc: implement htcfs protocol bringup

This commit is contained in:
Michael Scire
2021-02-12 22:07:34 -08:00
committed by SciresM
parent 99a38dce32
commit 5c97469348
10 changed files with 316 additions and 7 deletions

View File

@@ -82,7 +82,7 @@ namespace ams::htclow::mux {
/* Check that we have data. */
const auto ring_buffer_data_size = m_ring_buffer.GetDataSize();
if (ring_buffer_data_size > 0) {
if (ring_buffer_data_size == 0) {
return false;
}
@@ -102,7 +102,7 @@ namespace ams::htclow::mux {
const auto data_size = std::min(sendable_size, m_max_packet_size);
/* Make data packet header. */
this->MakeDataPacketHeader(header, data_size, m_version, max_data, share);
this->MakeDataPacketHeader(header, data_size, m_version, max_data, offset);
/* Copy the data. */
R_ABORT_UNLESS(m_ring_buffer.Copy(body, data_size));