ANI loader: Disable progress in embed loader

This commit is contained in:
Kim Woelders 2022-12-06 16:26:31 +01:00
parent 19028a4ca3
commit 7e7eae168a
1 changed files with 14 additions and 0 deletions

View File

@ -38,13 +38,27 @@ _load_embedded(ImlibImage * im, int load_data, const char *data,
{
int rc;
ImlibLoader *loader;
int frame;
void *lc;
loader = __imlib_FindBestLoader(NULL, "ico", 0);
if (!loader)
return LOAD_FAIL;
/* Disable frame and progress handling in sub-loader */
frame = im->frame;
lc = im->lc;
im->frame = 0;
im->lc = NULL;
rc = __imlib_LoadEmbeddedMem(loader, im, load_data, data, size);
im->frame = frame;
im->lc = lc;
if (rc == LOAD_SUCCESS && im->lc)
__imlib_LoadProgress(im, 0, 0, im->w, im->h);
return rc;
}