vice: build with both versions of giflib 4.x and 5.1.x
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
@@ -8,46 +8,58 @@ Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
||||
---
|
||||
src/gfxoutputdrv/gifdrv.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
src/gfxoutputdrv/gifdrv.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/gfxoutputdrv/gifdrv.c b/src/gfxoutputdrv/gifdrv.c
|
||||
index 7f7f3bc..5056b55 100644
|
||||
index 7f7f3bc..725e1f0 100644
|
||||
--- a/src/gfxoutputdrv/gifdrv.c
|
||||
+++ b/src/gfxoutputdrv/gifdrv.c
|
||||
@@ -114,7 +114,7 @@ static int gifdrv_open(screenshot_t *screenshot, const char *filename)
|
||||
@@ -114,7 +114,11 @@ static int gifdrv_open(screenshot_t *screenshot, const char *filename)
|
||||
if (EGifPutScreenDesc(sdata->fd, screenshot->width, screenshot->height, 8, 0, gif_colors) == GIF_ERROR ||
|
||||
EGifPutImageDesc(sdata->fd, 0, 0, screenshot->width, screenshot->height, 0, NULL) == GIF_ERROR)
|
||||
{
|
||||
- EGifCloseFile(sdata->fd);
|
||||
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
|
||||
+ EGifCloseFile(sdata->fd, 0);
|
||||
+#else
|
||||
EGifCloseFile(sdata->fd);
|
||||
+#endif
|
||||
VICE_FreeMapObject(gif_colors);
|
||||
lib_free(sdata->data);
|
||||
lib_free(sdata->ext_filename);
|
||||
@@ -145,7 +145,7 @@ static int gifdrv_close(screenshot_t *screenshot)
|
||||
@@ -145,7 +149,11 @@ static int gifdrv_close(screenshot_t *screenshot)
|
||||
|
||||
sdata = screenshot->gfxoutputdrv_data;
|
||||
|
||||
- EGifCloseFile(sdata->fd);
|
||||
+ #if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
|
||||
+ EGifCloseFile(sdata->fd, 0);
|
||||
+#else
|
||||
EGifCloseFile(sdata->fd);
|
||||
+#endif
|
||||
VICE_FreeMapObject(gif_colors);
|
||||
|
||||
/* for some reason giflib will create a file with unexpected
|
||||
@@ -184,7 +184,7 @@ static char *gifdrv_memmap_ext_filename;
|
||||
@@ -184,7 +192,11 @@ static char *gifdrv_memmap_ext_filename;
|
||||
|
||||
static int gifdrv_close_memmap(void)
|
||||
{
|
||||
- EGifCloseFile(gifdrv_memmap_fd);
|
||||
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
|
||||
+ EGifCloseFile(gifdrv_memmap_fd, 0);
|
||||
+#else
|
||||
EGifCloseFile(gifdrv_memmap_fd);
|
||||
+#endif
|
||||
VICE_FreeMapObject(gif_colors);
|
||||
lib_free(gifdrv_memmap_ext_filename);
|
||||
|
||||
@@ -231,7 +231,7 @@ static int gifdrv_open_memmap(const char *filename, int x_size, int y_size, BYTE
|
||||
@@ -231,7 +243,11 @@ static int gifdrv_open_memmap(const char *filename, int x_size, int y_size, BYTE
|
||||
if (EGifPutScreenDesc(gifdrv_memmap_fd, x_size, y_size, 8, 0, gif_colors) == GIF_ERROR ||
|
||||
EGifPutImageDesc(gifdrv_memmap_fd, 0, 0, x_size, y_size, 0, NULL) == GIF_ERROR)
|
||||
{
|
||||
- EGifCloseFile(gifdrv_memmap_fd);
|
||||
+#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 && GIFLIB_MINOR >= 1
|
||||
+ EGifCloseFile(gifdrv_memmap_fd, 0);
|
||||
+#else
|
||||
EGifCloseFile(gifdrv_memmap_fd);
|
||||
+#endif
|
||||
VICE_FreeMapObject(gif_colors);
|
||||
lib_free(gifdrv_memmap_ext_filename);
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user