ecere/gfx/bitmaps/GIF: Fixed support for GifLib 5
authorJerome St-Louis <jerome@ecere.com>
Wed, 3 Dec 2014 09:58:55 +0000 (04:58 -0500)
committerJerome St-Louis <jerome@ecere.com>
Wed, 3 Dec 2014 10:08:22 +0000 (05:08 -0500)
ecere/src/gfx/bitmaps/GIFFormat.ec

index 9020e0d..3c74624 100644 (file)
@@ -26,7 +26,7 @@ class GIFFormat : BitmapFormat
    {
       bool result = false;
 
-#if GIFLIB_MAJOR > 5
+#if GIFLIB_MAJOR >= 5
       GifFileType * gifFile = DGifOpen(f, ReadData, null);
 #else
       GifFileType * gifFile = DGifOpen(f, ReadData);
@@ -105,7 +105,11 @@ class GIFFormat : BitmapFormat
                result = true;
             }
          }
+#if GIFLIB_MAJOR >= 5
+         DGifCloseFile(gifFile, null);
+#else
          DGifCloseFile(gifFile);
+#endif
       }
 
       if(!result)