Skip to content

Commit

Permalink
DO NOT MERGE: Check commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lephilousophe committed Oct 12, 2024
1 parent d34b6ba commit b529384
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions backends/platform/psp/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ bool PspUnitTests::testFileSystem() {

PSP_INFO_PRINT("creating write stream...\n");

wrStream = file.createWriteStream();
wrStream = file.createWriteStream(true);
if (!wrStream) {
PSP_ERROR("%s couldn't be created.\n", path);
delete[] buffer;
Expand Down Expand Up @@ -654,7 +654,7 @@ bool PspUnitTests::testFileSystem() {

PSP_INFO_PRINT("writing...\n");

wrStream = file.createWriteStream();
wrStream = file.createWriteStream(true);
if (!wrStream) {
PSP_ERROR("%s couldn't be created.\n", path);
return false;
Expand Down
2 changes: 1 addition & 1 deletion backends/saves/default/default-saves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const Common::String
}

// Open the file for saving.
Common::SeekableWriteStream *const sf = fileNode.createWriteStream();
Common::SeekableWriteStream *const sf = fileNode.createWriteStream(true);
if (!sf)
return nullptr;
Common::OutSaveFile *const result = new Common::OutSaveFile(compress ? Common::wrapCompressedWriteStream(sf) : sf);
Expand Down
2 changes: 1 addition & 1 deletion common/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ bool DumpFile::open(const FSNode &node) {
return false;
}

_handle = node.createWriteStream();
_handle = node.createWriteStream(true);

if (_handle == nullptr)
debug(2, "File %s not found", node.getName().c_str());
Expand Down
2 changes: 1 addition & 1 deletion common/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class FSNode : public ArchiveMember {
*
* @return Pointer to the stream object, 0 in case of a failure.
*/
SeekableWriteStream *createWriteStream(bool atomic = true) const;
SeekableWriteStream *createWriteStream(bool atomic /*= true*/) const;

/**
* Create a directory referred by this node. This assumes that this
Expand Down
2 changes: 1 addition & 1 deletion common/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Common::WriteStream *OSystem::createConfigWriteStream() {
return nullptr;
#else
Common::FSNode file(getDefaultConfigFileName());
return file.createWriteStream();
return file.createWriteStream(true);
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion engines/bladerunner/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ bool Debugger::cmdSave(int argc, const char **argv) {
return true;
}

Common::WriteStream *saveFile = fs.createWriteStream();
Common::WriteStream *saveFile = fs.createWriteStream(true);

Graphics::Surface thumbnail = _vm->generateThumbnail();

Expand Down
2 changes: 1 addition & 1 deletion engines/director/lingo/xlibs/unittest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void UnitTestXObj::m_screenshot(int nargs) {
Common::FSNode file = screenDir.getChild(Common::String::format("%s.bmp", filenameBase.c_str()));
#endif

Common::SeekableWriteStream *stream = file.createWriteStream();
Common::SeekableWriteStream *stream = file.createWriteStream(true);
if (!stream) {
warning("UnitTestXObj::m_screenshot(): could not open file %s", file.getPath().toString(Common::Path::kNativeSeparator).c_str());
return;
Expand Down
2 changes: 1 addition & 1 deletion engines/kyra/gui/saveload_eob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ bool EoBCoreEngine::saveAsOriginalSaveFile(int slot) {
return false;

Common::FSNode nf = nd.getChild(_flags.gameID == GI_EOB1 ? "EOBDATA.SAV" : Common::String::format("EOBDATA%d.SAV", slot));
Common::OutSaveFile *out = new Common::OutSaveFile(nf.createWriteStream());
Common::OutSaveFile *out = new Common::OutSaveFile(nf.createWriteStream(true));

if (_flags.gameID == GI_EOB2) {
static const char tempStr[31] = "SCUMMVM EXPORT\0";
Expand Down
2 changes: 1 addition & 1 deletion engines/testbed/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Common::WriteStream *TestbedConfigManager::getConfigWriteStream() const {
Common::WriteStream *ws;
Common::FSNode gameRoot(path);
Common::FSNode config = gameRoot.getChild(_configFileName);
ws = config.createWriteStream();
ws = config.createWriteStream(true);
return ws;
}

Expand Down
2 changes: 1 addition & 1 deletion engines/testbed/fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ TestExitStatus FStests::testWriteFile() {

Common::FSNode fileToWrite = gameRoot.getChild("testbed.out");

Common::WriteStream *ws = fileToWrite.createWriteStream();
Common::WriteStream *ws = fileToWrite.createWriteStream(true);

if (!ws) {
Testsuite::logDetailedPrintf("Can't open writable file in game data dir\n");
Expand Down
2 changes: 1 addition & 1 deletion gui/downloadpacksdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ void DownloadPacksDialog::clearCache() {
for (auto ic = iconFiles.begin(); ic != iconFiles.end(); ++ic) {
Common::String fname = (*ic)->getName();
Common::FSNode fs(iconsPath.join(fname));
Common::WriteStream *str = fs.createWriteStream();
Common::WriteStream *str = fs.createWriteStream(true);

// Overwrite previously downloaded pack files with dummy data
str->writeByte(0);
Expand Down
2 changes: 1 addition & 1 deletion test/image/blending.h
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ OldTransparentSurface *OldTransparentSurface::scale(int16 newWidth, int16 newHei
#ifdef TEST_IMAGE_BLENDING_SAVE
static int save_bitmap(const char *path, const Graphics::Surface *surf) {
Common::FSNode fileNode(path);
Common::SeekableWriteStream *out = fileNode.createWriteStream();
Common::SeekableWriteStream *out = fileNode.createWriteStream(true);
#ifdef SCUMM_LITTLE_ENDIAN
const Graphics::PixelFormat requiredFormat_3byte(3, 8, 8, 8, 0, 16, 8, 0, 0);
#else
Expand Down

0 comments on commit b529384

Please sign in to comment.