From 4947387198b52f8e97e26adca306c8dd1062e2ee Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 16 Oct 2021 17:43:51 +0200 Subject: [PATCH] Don't split files when saving to USB --- source/WUDDumperState.cpp | 4 ++-- source/fs/WriteOnlyFileWithCache.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/WUDDumperState.cpp b/source/WUDDumperState.cpp index 2edb2aa..16357c9 100644 --- a/source/WUDDumperState.cpp +++ b/source/WUDDumperState.cpp @@ -126,10 +126,10 @@ ApplicationState::eSubState WUDDumperState::update(Input *input) { } if (targetFormat == DUMP_AS_WUX) { this->fileHandle = std::make_unique(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(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"); diff --git a/source/fs/WriteOnlyFileWithCache.cpp b/source/fs/WriteOnlyFileWithCache.cpp index 6bb148d..218a83f 100644 --- a/source/fs/WriteOnlyFileWithCache.cpp +++ b/source/fs/WriteOnlyFileWithCache.cpp @@ -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(addr), realWriteSize) != (int32_t) realWriteSize) { return -3; }