diff options
Diffstat (limited to 'demos/modules/gdisp/images_animated')
-rw-r--r-- | demos/modules/gdisp/images_animated/gfxconf.h | 3 | ||||
-rw-r--r-- | demos/modules/gdisp/images_animated/main.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/demos/modules/gdisp/images_animated/gfxconf.h b/demos/modules/gdisp/images_animated/gfxconf.h index cc38ed36..b2dcaf92 100644 --- a/demos/modules/gdisp/images_animated/gfxconf.h +++ b/demos/modules/gdisp/images_animated/gfxconf.h @@ -51,5 +51,8 @@ #define GDISP_NEED_IMAGE_JPG FALSE #define GDISP_NEED_IMAGE_PNG FALSE +#define GFX_USE_GFILE TRUE +#define GFILE_NEED_MEMFS TRUE + #endif /* _GFXCONF_H */ diff --git a/demos/modules/gdisp/images_animated/main.c b/demos/modules/gdisp/images_animated/main.c index 9b2b5d2c..bf49f692 100644 --- a/demos/modules/gdisp/images_animated/main.c +++ b/demos/modules/gdisp/images_animated/main.c @@ -76,12 +76,11 @@ int main(void) { // Set up IO for our image #if USE_MEMORY_FILE - gdispImageSetMemoryReader(&myImage, testanim); + if (!(gdispImageOpenMemory(&myImage, testanim) & GDISP_IMAGE_ERR_UNRECOVERABLE)) { #else - gdispImageSetFileReader(&myImage, "testanim.gif"); + if (!(gdispImageOpenFile(&myImage, "testanim.gif") & GDISP_IMAGE_ERR_UNRECOVERABLE)) { #endif - if (gdispImageOpen(&myImage) == GDISP_IMAGE_ERR_OK) { gdispImageSetBgColor(&myImage, MY_BG_COLOR); // Adjust the error indicator area if necessary if (myImage.width > errx && myImage.height < sheight) { |