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:
Michael Jennings 2000-04-27 02:46:26 +00:00
parent eb2cbfaef0
commit ceec186cb7
2 changed files with 12 additions and 1 deletions

View File

@ -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.

View File

@ -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;
}
}