mirror of
https://github.com/Team-Neptune/NSAInstaller.git
synced 2024-11-23 12:49:52 +00:00
Roll back to 8MB buffer sizes to avoid random freezes
This commit is contained in:
parent
c30e7b7cf3
commit
54dea51b01
@ -31,7 +31,7 @@ SOFTWARE.
|
||||
|
||||
namespace tin::data
|
||||
{
|
||||
static const size_t BUFFER_SEGMENT_DATA_SIZE = 0x1000000; // Approximately 16MB
|
||||
static const size_t BUFFER_SEGMENT_DATA_SIZE = 0x800000; // Approximately 8MB
|
||||
extern int NUM_BUFFER_SEGMENTS;
|
||||
|
||||
struct BufferSegment
|
||||
@ -41,7 +41,7 @@ namespace tin::data
|
||||
u8 data[BUFFER_SEGMENT_DATA_SIZE] = {0};
|
||||
};
|
||||
|
||||
// Receives data in a circular buffer split into 16MB segments
|
||||
// Receives data in a circular buffer split into 8MB segments
|
||||
class BufferedPlaceholderWriter
|
||||
{
|
||||
private:
|
||||
|
@ -61,7 +61,7 @@ namespace tin::install::nsp
|
||||
USBFuncArgs* args = reinterpret_cast<USBFuncArgs*>(in);
|
||||
tin::util::USBCmdHeader header = tin::util::USBCmdManager::SendFileRangeCmd(args->nspName, args->pfs0Offset, args->ncaSize);
|
||||
|
||||
u8* buf = (u8*)memalign(0x1000, 0x1000000);
|
||||
u8* buf = (u8*)memalign(0x1000, 0x800000);
|
||||
u64 sizeRemaining = header.dataSize;
|
||||
size_t tmpSizeRead = 0;
|
||||
|
||||
@ -69,7 +69,7 @@ namespace tin::install::nsp
|
||||
{
|
||||
while (sizeRemaining && !stopThreadsUsbNsp)
|
||||
{
|
||||
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x1000000));
|
||||
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x800000));
|
||||
if (tmpSizeRead == 0) THROW_FORMAT(("inst.usb.error"_lang).c_str());
|
||||
sizeRemaining -= tmpSizeRead;
|
||||
|
||||
|
@ -60,7 +60,7 @@ namespace tin::install::xci
|
||||
USBFuncArgs* args = reinterpret_cast<USBFuncArgs*>(in);
|
||||
tin::util::USBCmdHeader header = tin::util::USBCmdManager::SendFileRangeCmd(args->xciName, args->hfs0Offset, args->ncaSize);
|
||||
|
||||
u8* buf = (u8*)memalign(0x1000, 0x1000000);
|
||||
u8* buf = (u8*)memalign(0x1000, 0x800000);
|
||||
u64 sizeRemaining = header.dataSize;
|
||||
size_t tmpSizeRead = 0;
|
||||
|
||||
@ -68,7 +68,7 @@ namespace tin::install::xci
|
||||
{
|
||||
while (sizeRemaining && !stopThreadsUsbXci)
|
||||
{
|
||||
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x1000000));
|
||||
tmpSizeRead = awoo_usbCommsRead(buf, std::min(sizeRemaining, (u64)0x800000));
|
||||
if (tmpSizeRead == 0) THROW_FORMAT(("inst.usb.error"_lang).c_str());
|
||||
sizeRemaining -= tmpSizeRead;
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace inst::ui {
|
||||
}
|
||||
} else if (!appletFinished) {
|
||||
inst::ui::appletFinished = true;
|
||||
tin::data::NUM_BUFFER_SEGMENTS = 4;
|
||||
tin::data::NUM_BUFFER_SEGMENTS = 8;
|
||||
}
|
||||
if (!updateFinished && (!inst::config::autoUpdate || inst::util::getIPAddress() == "1.0.0.127")) updateFinished = true;
|
||||
if (!updateFinished && menuLoaded && inst::config::updateInfo.size()) {
|
||||
|
Loading…
Reference in New Issue
Block a user