From a1d945a61fbbf8a82d124b0d5236f116308b4886 Mon Sep 17 00:00:00 2001 From: Mihai Parparita Date: Mon, 2 Dec 2024 22:50:03 -0800 Subject: [PATCH] Revert unintentional change to imgfile_sdl.cpp Did not mean to include this in #127 --- utils/imgfile_sdl.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/utils/imgfile_sdl.cpp b/utils/imgfile_sdl.cpp index 43aca2b..4cffebe 100644 --- a/utils/imgfile_sdl.cpp +++ b/utils/imgfile_sdl.cpp @@ -42,7 +42,7 @@ ImgFile::~ImgFile() = default; bool ImgFile::open(const std::string &img_path) { - if (is_deterministic && false) { + if (is_deterministic) { // Avoid writes to the underlying file by reading it all in memory and // only operating on that. auto mem_stream = std::make_unique(); @@ -90,9 +90,6 @@ uint64_t ImgFile::read(void* buf, uint64_t offset, uint64_t length) const uint64_t ImgFile::write(const void* buf, uint64_t offset, uint64_t length) { - if (is_deterministic) { - return length; - } if (!impl->stream) { LOG_F(WARNING, "ImgFile::write before disk was opened, ignoring."); return 0;