2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 15:21:32 +00:00

Allow for named images.

This commit is contained in:
Michael Brown 2007-01-11 23:45:18 +00:00
parent f59ad50504
commit 7bf94b5ad6

View File

@ -49,9 +49,11 @@ static struct image_type image_types_end[0]
int register_image ( struct image *image ) {
static unsigned int imgindex = 0;
/* Create image name */
snprintf ( image->name, sizeof ( image->name ), "img%d",
imgindex++ );
/* Create image name if it doesn't already have one */
if ( ! image->name[0] ) {
snprintf ( image->name, sizeof ( image->name ), "img%d",
imgindex++ );
}
/* Add to image list */
list_add_tail ( &image->list, &images );