New gdispImageInit() call to initialise a gdispImage structure
Use in gwinImageremotes/origin_old/ugfx_release_2.6
parent
7c2b2555f8
commit
cf5867b33d
|
@ -130,6 +130,10 @@ gdispImageError
|
|||
}
|
||||
#endif
|
||||
|
||||
void gdispImageInit(gdispImage *img) {
|
||||
img->type = GDISP_IMAGE_TYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
gdispImageError gdispImageOpenGFile(gdispImage *img, GFILE *f) {
|
||||
gdispImageError err;
|
||||
|
||||
|
|
|
@ -130,6 +130,14 @@ extern "C" {
|
|||
#define gdispImageSetSimulFileReader(img, fname) gdispImageSetFileReader(img, fname)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Initialise a gdispImage object
|
||||
*
|
||||
* @param[in] img The image structure to initialise
|
||||
*
|
||||
*/
|
||||
void gdispImageInit(gdispImage *img);
|
||||
|
||||
/**
|
||||
* @brief Open an image using an open GFILE and get it ready for drawing
|
||||
* @details Determine the image format and get ready to decode the first image frame
|
||||
|
|
|
@ -127,8 +127,7 @@ GHandle gwinGImageCreate(GDisplay *g, GImageObject *gobj, GWindowInit *pInit) {
|
|||
return 0;
|
||||
|
||||
// Ensure the gdispImageIsOpen() gives valid results
|
||||
gobj->image.type = 0;
|
||||
gobj->image.fns = 0;
|
||||
gdispImageInit(&gobj->image);
|
||||
|
||||
// Initialise the timer
|
||||
#if GWIN_NEED_IMAGE_ANIMATION
|
||||
|
|
Loading…
Reference in New Issue