From b672e0a75f51030dbb3dac2351543f2d5ec77a15 Mon Sep 17 00:00:00 2001 From: n-a-c-h <> Date: Sun, 21 Nov 2004 15:03:19 +0000 Subject: [PATCH] Smaller footprint on JMA's with a single file --- zsnes/src/jma/jma.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/zsnes/src/jma/jma.cpp b/zsnes/src/jma/jma.cpp index f9afad32..a7842c77 100644 --- a/zsnes/src/jma/jma.cpp +++ b/zsnes/src/jma/jma.cpp @@ -362,6 +362,13 @@ namespace JMA throw(JMA_FILE_NOT_FOUND); } + //If the JMA only contains one file, we can skip a lot of overhead + if (files.size() == 1) + { + get_all_files(buffer); + return; + } + if (chunk_size) //we are using non-solid archive.. { unsigned int chunks_to_skip = size_to_skip / chunk_size;