Don't split files when saving to USB

This commit is contained in:
Maschell 2021-10-16 17:43:51 +02:00
parent e87ad53031
commit 4947387198
2 changed files with 3 additions and 3 deletions

View File

@ -126,10 +126,10 @@ ApplicationState::eSubState WUDDumperState::update(Input *input) {
}
if (targetFormat == DUMP_AS_WUX) {
this->fileHandle = std::make_unique<WUXFileWriter>(StringTools::fmt("%swudump/%s/game.wux", getPathForDevice(targetDevice).c_str(), discId), READ_SECTOR_SIZE * WRITE_BUFFER_NUM_SECTORS,
SECTOR_SIZE, true);
SECTOR_SIZE, targetDevice == TARGET_SD);
} else {
this->fileHandle = std::make_unique<WUDFileWriter>(StringTools::fmt("%swudump/%s/game.wud", getPathForDevice(targetDevice).c_str(), discId), READ_SECTOR_SIZE * WRITE_BUFFER_NUM_SECTORS,
SECTOR_SIZE, true);
SECTOR_SIZE, targetDevice == TARGET_SD);
}
if (!this->fileHandle->isOpen()) {
DEBUG_FUNCTION_LINE("Failed to open file");

View File

@ -67,7 +67,7 @@ int32_t WriteOnlyFileWithCache::write(const uint8_t *addr, size_t writeSize) {
uint32_t realWriteSize = SPLIT_SIZE - pos;
if (realWriteSize > 0) {
DEBUG_FUNCTION_LINE("Write remaining %016lld bytes", realWriteSize);
DEBUG_FUNCTION_LINE("Write remaining %8d bytes", realWriteSize);
if (CFile::write(reinterpret_cast<const uint8_t *>(addr), realWriteSize) != (int32_t) realWriteSize) {
return -3;
}