Allow for named images.
This commit is contained in:
parent
f59ad50504
commit
7bf94b5ad6
|
@ -49,9 +49,11 @@ static struct image_type image_types_end[0]
|
||||||
int register_image ( struct image *image ) {
|
int register_image ( struct image *image ) {
|
||||||
static unsigned int imgindex = 0;
|
static unsigned int imgindex = 0;
|
||||||
|
|
||||||
/* Create image name */
|
/* Create image name if it doesn't already have one */
|
||||||
snprintf ( image->name, sizeof ( image->name ), "img%d",
|
if ( ! image->name[0] ) {
|
||||||
imgindex++ );
|
snprintf ( image->name, sizeof ( image->name ), "img%d",
|
||||||
|
imgindex++ );
|
||||||
|
}
|
||||||
|
|
||||||
/* Add to image list */
|
/* Add to image list */
|
||||||
list_add_tail ( &image->list, &images );
|
list_add_tail ( &image->list, &images );
|
||||||
|
|
Reference in New Issue