From 4483501011d2a94e20b4e00023757963b84a5c7f Mon Sep 17 00:00:00 2001 From: Sorgelig Date: Sun, 17 Dec 2023 00:14:34 +0800 Subject: [PATCH] user_io: don't waste time for crc32 if cheats aren't used. --- user_io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_io.cpp b/user_io.cpp index f387b4f..f495148 100644 --- a/user_io.cpp +++ b/user_io.cpp @@ -2657,7 +2657,7 @@ int user_io_file_tx(const char* name, unsigned char index, char opensave, char m uint32_t chunk = (bytes2send > (256 * 1024)) ? (256 * 1024) : bytes2send; FileReadAdv(&f, mem + size - bytes2send + gap, chunk); - if(!is_snes()) file_crc = crc32(file_crc, mem + skip + size - bytes2send, chunk - skip); + if(!is_snes() && use_cheats) file_crc = crc32(file_crc, mem + skip + size - bytes2send, chunk - skip); skip = 0; if (use_progress) ProgressMessage("Loading", f.name, size - bytes2send, size);