diff options
author | Kim Woelders <kim@woelders.dk> | 2021-04-10 06:14:59 +0200 |
---|---|---|
committer | Kim Woelders <kim@woelders.dk> | 2021-04-13 06:56:32 +0200 |
commit | 1f6438a1c7a935d4e5724e650d856cfc5d5f3429 (patch) | |
tree | d0b40701ce03482812e75297c8584f9bb01729af | |
parent | 7eb6c6388b74a148260ab894183ddacecfebf105 (diff) | |
download | imlib2-1f6438a1c7a935d4e5724e650d856cfc5d5f3429.tar.gz |
ICO loader: Enable specifying ico image index by key
-rw-r--r-- | src/modules/loaders/loader_ico.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/modules/loaders/loader_ico.c b/src/modules/loaders/loader_ico.c index 86a2296..fc12dbf 100644 --- a/src/modules/loaders/loader_ico.c +++ b/src/modules/loaders/loader_ico.c @@ -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]; |