forked from old/legacy-imlib2
Wed Apr 26 19:58:05 PDT 2000
(KainX) If progress() returns 0, clip the last row and return 2. SVN revision: 2548
This commit is contained in:
parent
eb2cbfaef0
commit
ceec186cb7
|
@ -2877,3 +2877,8 @@ Otherwise, I'll do it myself tomorrow.
|
|||
|
||||
_______________________________________________
|
||||
|
||||
Wed Apr 26 19:58:05 PDT 2000
|
||||
(KainX)
|
||||
|
||||
If progress() returns 0, clip the last row and
|
||||
return 2.
|
||||
|
|
|
@ -149,7 +149,13 @@ load(ImlibImage *im, ImlibProgressFunction progress, char progress_granularity,
|
|||
per += per_inc;
|
||||
if (progress && (((int) per) != last_per) && (((int) per) % progress_granularity == 0)) {
|
||||
last_per = (int) per;
|
||||
progress(im, (int) per, 0, last_y, w, i);
|
||||
if (!(progress(im, (int) per, 0, last_y, w, i))) {
|
||||
/* Early termination. Give back everything but
|
||||
the current row, since it's incomplete. */
|
||||
im->data = (DATA32 *) realloc(im->data, sizeof(DATA32) * w * i);
|
||||
im->h = i;
|
||||
return 2;
|
||||
}
|
||||
last_y = i;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue