diff --git a/sphaira/CMakeLists.txt b/sphaira/CMakeLists.txt index 77357c3..f3143fd 100644 --- a/sphaira/CMakeLists.txt +++ b/sphaira/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.13) -set(sphaira_VERSION 0.11.2) +set(sphaira_VERSION 0.11.3) project(sphaira VERSION ${sphaira_VERSION} diff --git a/sphaira/source/usb/usbds.cpp b/sphaira/source/usb/usbds.cpp index 58e8f64..5427ec3 100644 --- a/sphaira/source/usb/usbds.cpp +++ b/sphaira/source/usb/usbds.cpp @@ -293,7 +293,7 @@ Result UsbDs::WaitTransferCompletion(UsbSessionEndpoint ep, u64 timeout) { } Result UsbDs::TransferAsync(UsbSessionEndpoint ep, void *buffer, u32 remaining, u32 size, u32 *out_urb_id) { - if (remaining == size && size == m_max_packet_size) { + if (remaining == size && !(size % (u32)m_max_packet_size)) { log_write("[USBDS] SetZlt(true)\n"); R_TRY(usbDsEndpoint_SetZlt(m_endpoints[ep], true)); } else { diff --git a/sphaira/source/yati/yati.cpp b/sphaira/source/yati/yati.cpp index b93bf07..2ee7799 100644 --- a/sphaira/source/yati/yati.cpp +++ b/sphaira/source/yati/yati.cpp @@ -704,7 +704,7 @@ Result Yati::writeFuncInternal(ThreadData* t) { s64 off{}; while (off < buf.size() && t->write_offset < t->write_size && R_SUCCEEDED(t->GetResults())) { const auto wsize = std::min(t->read_buffer_size, buf.size() - off); - R_TRY(ncmContentStorageWritePlaceHolder(std::addressof(cs), std::addressof(t->nca->placeholder_id), t->write_offset + off, buf.data() + off, wsize)); + R_TRY(ncmContentStorageWritePlaceHolder(std::addressof(cs), std::addressof(t->nca->placeholder_id), t->write_offset, buf.data() + off, wsize)); off += wsize; t->write_offset += wsize;