mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-23 16:43:58 +08:00
fix another bug in GAL_StretchBltLegacy
This commit is contained in:
@@ -360,14 +360,6 @@ static int GAL_StretchBltLegacy (GAL_Surface *src, GAL_Rect *srcrect,
|
||||
{
|
||||
GAL_Rect clipped_srcrect, clipped_dstrect;
|
||||
|
||||
if (GAL_RMask (src) != GAL_RMask (dst)
|
||||
|| GAL_GMask (src) != GAL_GMask (dst)
|
||||
|| GAL_BMask (src) != GAL_BMask (dst)
|
||||
|| GAL_AMask (src) != GAL_AMask (dst)) {
|
||||
GAL_SoftStretchHelper (src, srcrect, dst, dstrect, op);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dstrect->x >= dst->clip_rect.x &&
|
||||
dstrect->y >= dst->clip_rect.y &&
|
||||
dstrect->x + dstrect->w <= dst->clip_rect.x + dst->clip_rect.w &&
|
||||
@@ -395,6 +387,14 @@ static int GAL_StretchBltLegacy (GAL_Surface *src, GAL_Rect *srcrect,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (GAL_RMask (src) != GAL_RMask (dst)
|
||||
|| GAL_GMask (src) != GAL_GMask (dst)
|
||||
|| GAL_BMask (src) != GAL_BMask (dst)
|
||||
|| GAL_AMask (src) != GAL_AMask (dst)) {
|
||||
GAL_SoftStretchHelper (src, &clipped_srcrect, dst, &clipped_dstrect, op);
|
||||
return 0;
|
||||
}
|
||||
|
||||
GAL_SoftStretch (src, &clipped_srcrect, dst, &clipped_dstrect);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user