If FillHWRect() retruns non-zero, use GAL_SoftFillRect()

This commit is contained in:
Vincent Wei
2023-07-22 19:02:41 +08:00
parent 0f566d0342
commit 6be4b719c8
+3 -2
View File
@@ -867,7 +867,7 @@ int GAL_FillRect(GAL_Surface *dst, const GAL_Rect *dstrect, Uint32 color)
if (dstrect) {
/* Perform clipping */
if (!GAL_IntersectRect(dstrect, &dst->clip_rect, &my_dstrect)) {
return(0);
return 0;
}
} else {
my_dstrect = dst->clip_rect;
@@ -876,7 +876,8 @@ int GAL_FillRect(GAL_Surface *dst, const GAL_Rect *dstrect, Uint32 color)
/* Check for hardware acceleration */
if (((dst->flags & GAL_HWSURFACE) == GAL_HWSURFACE) &&
video->info.blit_fill) {
return(video->FillHWRect(this, dst, &my_dstrect, color));
if (video->FillHWRect(this, dst, &my_dstrect, color) == 0)
return 0;
}
#ifdef _MGUSE_PIXMAN