mirror of
https://github.com/Team-Neptune/NSAInstaller.git
synced 2024-11-30 08:00:43 +00:00
Finally a solution to usb installs
This commit is contained in:
parent
1720d5eae7
commit
1fcd19d445
@ -155,6 +155,8 @@ namespace tin::install::nsp
|
||||
{
|
||||
LOG_DEBUG("buffering 0x%lx-0x%lx", offset, offset + size);
|
||||
tin::util::USBCmdHeader header = tin::util::USBCmdManager::SendFileRangeCmd(m_nspName, offset, size);
|
||||
if (tin::util::USBRead(buf, header.dataSize) == 0) THROW_FORMAT("USB error");
|
||||
u8* ourBuffer = (u8*)memalign(0x1000, header.dataSize);
|
||||
if (tin::util::USBRead(ourBuffer, header.dataSize) == 0) THROW_FORMAT("USB error");
|
||||
memcpy(buf, ourBuffer, header.dataSize);
|
||||
}
|
||||
}
|
@ -155,6 +155,8 @@ namespace tin::install::xci
|
||||
{
|
||||
LOG_DEBUG("buffering 0x%lx-0x%lx", offset, offset + size);
|
||||
tin::util::USBCmdHeader header = tin::util::USBCmdManager::SendFileRangeCmd(m_xciName, offset, size);
|
||||
if (tin::util::USBRead(buf, header.dataSize) == 0) THROW_FORMAT("USB error");
|
||||
u8* ourBuffer = (u8*)memalign(0x1000, header.dataSize);
|
||||
if (tin::util::USBRead(ourBuffer, header.dataSize) == 0) THROW_FORMAT("USB error");
|
||||
memcpy(buf, ourBuffer, header.dataSize);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user