forked from old/legacy-imlib2
ICO loader: Enable specifying ico image index by key
This commit is contained in:
parent
7eb6c6388b
commit
1f6438a1c7
|
@ -308,13 +308,12 @@ ico_load(ico_t * ico, ImlibImage * im, int load_data)
|
|||
}
|
||||
|
||||
/* Enable overriding selected index for debug purposes */
|
||||
{
|
||||
const char *s = getenv("IMLIB2_LOADER_ICO");
|
||||
|
||||
ic = (s) ? atoi(s) : ic;
|
||||
if (ic >= ico->idir.icons)
|
||||
return 0;
|
||||
}
|
||||
if (im->key)
|
||||
{
|
||||
ic = atoi(im->key);
|
||||
if (ic >= ico->idir.icons)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ie = &ico->ie[ic];
|
||||
|
||||
|
|
Loading…
Reference in New Issue