diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-02-07 18:44:32 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-02-07 18:44:32 +1000 |
commit | 4d3a08f5cfd244f82d1283cab702450e1dad14cd (patch) | |
tree | 817f58f61455ef4d0c296a7a44f4b56d0999b29e /demos/modules/gdisp/images/main.c | |
parent | f7d6b9b58e4e8d979004026b41c1bfd275218fb9 (diff) | |
download | uGFX-4d3a08f5cfd244f82d1283cab702450e1dad14cd.tar.gz uGFX-4d3a08f5cfd244f82d1283cab702450e1dad14cd.tar.bz2 uGFX-4d3a08f5cfd244f82d1283cab702450e1dad14cd.zip |
Update image demo's to use GFILE ROMFS.
Diffstat (limited to 'demos/modules/gdisp/images/main.c')
-rw-r--r-- | demos/modules/gdisp/images/main.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/demos/modules/gdisp/images/main.c b/demos/modules/gdisp/images/main.c index 021bf9f5..6a2e4418 100644 --- a/demos/modules/gdisp/images/main.c +++ b/demos/modules/gdisp/images/main.c @@ -29,15 +29,12 @@ #include "gfx.h" -#ifdef WIN32 - #define USE_MEMORY_FILE TRUE // Can be true or false for Win32 -#else - #define USE_MEMORY_FILE TRUE // Non-Win32 - use the compiled in image -#endif - -#if USE_MEMORY_FILE - #include "test-pal8.h" -#endif +/** + * The image file must be stored on a GFILE file-system. + * Use either GFILE_NEED_NATIVEFS or GFILE_NEED_ROMFS (or both). + * + * The ROMFS uses the file "romfs_files.h" to describe the set of files in the ROMFS. + */ static gdispImage myImage; @@ -52,12 +49,7 @@ int main(void) { sheight = gdispGetHeight(); // Set up IO for our image -#if USE_MEMORY_FILE - gdispImageOpenMemory(&myImage, test_pal8); -#else gdispImageOpenFile(&myImage, "test-pal8.bmp"); -#endif - gdispImageDraw(&myImage, 0, 0, swidth, sheight, 0, 0); gdispImageClose(&myImage); |