more accuracy fixes
[picodrive.git] / Pico / Cart.c
index a865033..a847088 100644 (file)
@@ -1,7 +1,7 @@
 // This is part of Pico Library\r
 \r
 // (c) Copyright 2004 Dave, All rights reserved.\r
-// (c) Copyright 2006 notaz, All rights reserved.\r
+// (c) Copyright 2006-2007, Grazvydas "notaz" Ignotas\r
 // Free for non-commercial use.\r
 \r
 // For commercial use, separate licencing terms must be obtained.\r
@@ -129,6 +129,11 @@ int pm_seek(pm_file *stream, long offset, int whence)
   }\r
   else if (stream->type == PMT_ZIP)\r
   {\r
+    if (PicoMessage != NULL && offset > 6*1024*1024) {\r
+      long pos = gztell((gzFile) stream->param);\r
+      if (offset < pos || offset - pos > 6*1024*1024)\r
+        PicoMessage("Decompressing data...");\r
+    }\r
     return gzseek((gzFile) stream->param, offset, whence);\r
   }\r
   else\r