diff options
author | ace20022 <ace20022@ymail.com> | 2016-01-04 22:05:34 +0100 |
---|---|---|
committer | ace20022 <ace20022@ymail.com> | 2016-01-06 23:40:30 +0100 |
commit | d4b994823e042ec47bf821ca5055216aaf443f6d (patch) | |
tree | 9ec0a5c539863e8e9d369b09d10b88a5c7975dd2 | |
parent | 1c796be27cef5b231727219e3d87aa4ffc900fbe (diff) |
[gif] Add more version #ifdefs.
-rw-r--r-- | xbmc/guilib/DllLibGif.h | 8 | ||||
-rw-r--r-- | xbmc/guilib/Gif.cpp | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/xbmc/guilib/DllLibGif.h b/xbmc/guilib/DllLibGif.h index 284f52d715..e082f697db 100644 --- a/xbmc/guilib/DllLibGif.h +++ b/xbmc/guilib/DllLibGif.h @@ -52,8 +52,12 @@ public: virtual GifFileType* DGifOpenFileName(const char *GifFileName, int *Error) = 0; virtual GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error) = 0; virtual int DGifSavedExtensionToGCB(GifFileType *GifFile, int ImageIndex, GraphicsControlBlock *GCB) = 0; +#if GIFLIB_MINOR >= 1 virtual int DGifCloseFile(GifFileType* GifFile, int *Error)=0; #else + virtual int DGifCloseFile(GifFileType* GifFile) = 0; +#endif +#else virtual GifFileType* DGifOpenFileName(const char *GifFileName) = 0; virtual GifFileType *DGifOpen(void *userPtr, InputFunc readFunc)=0; virtual int DGifGetExtension(GifFileType * GifFile, int *GifExtCode, GifByteType ** GifExtension) = 0; @@ -72,8 +76,12 @@ class DllLibGif : public DllDynamic, DllLibGifInterface DEFINE_METHOD2(GifFileType*, DGifOpenFileName, (const char *p1, int *p2)) DEFINE_METHOD3(GifFileType*, DGifOpen, (void *p1, InputFunc p2, int *p3)) DEFINE_METHOD3(int, DGifSavedExtensionToGCB, (GifFileType *p1, int p2, GraphicsControlBlock *p3)) +#if GIFLIB_MINOR >= 1 DEFINE_METHOD2(int, DGifCloseFile, (GifFileType* p1, int *p2)) #else + DEFINE_METHOD1(int, DGifCloseFile, (GifFileType* p1)) +#endif +#else DEFINE_METHOD0(int, GifLastError) DEFINE_METHOD1(GifFileType*, DGifOpenFileName, (const char *p1)) DEFINE_METHOD2(GifFileType*, DGifOpen, (void *p1, InputFunc p2)) diff --git a/xbmc/guilib/Gif.cpp b/xbmc/guilib/Gif.cpp index 160896f558..1e5792d82d 100644 --- a/xbmc/guilib/Gif.cpp +++ b/xbmc/guilib/Gif.cpp @@ -98,11 +98,13 @@ void Gif::Close(GifFileType* gif) { int err = 0; int reason = 0; -#if GIFLIB_MAJOR == 5 +#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 err = m_dll.DGifCloseFile(gif, &reason); #else err = m_dll.DGifCloseFile(gif); +#if GIFLIB_MAJOR < 5 reason = m_dll.GifLastError(); +#endif if (err == GIF_ERROR) free(gif); #endif |