Stretch blits involving surfaces >2GB fail

Stretch blits involving surfaces >2GB fail, this patch fixes it: (by treating the offset into the surface as a 64-bit value, rather than 32-bit)

diff --git a/src/video/SDL_stretch.c b/src/video/SDL_stretch.c
index acdc63bd1..6e13c5e56 100644
— a/src/video/SDL_stretch.c
+++ b/src/video/SDL_stretch.c
@@ -834,8 +834,8 @@ bool SDL_LowerSoftStretchLinear(SDL_Surface *s, const SDL_Rect *srcrect, SDL_Sur
int dst_h = dstrect->h;
int src_pitch = s->pitch;
int dst_pitch = d->pitch;

  • Uint32 *src = (Uint32 *)((Uint8 *)s->pixels + srcrect->x * 4 + srcrect->y * src_pitch);
  • Uint32 *dst = (Uint32 *)((Uint8 *)d->pixels + dstrect->x * 4 + dstrect->y * dst_pitch);
  • Uint32 *src = (Uint32 *)((Uint8 *)s->pixels + srcrect->x * 4 + srcrect->y * (Uint64)src_pitch);
  • Uint32 *dst = (Uint32 *)((Uint8 *)d->pixels + dstrect->x * 4 + dstrect->y * (Uint64)dst_pitch);

#ifdef SDL_NEON_INTRINSICS
if (!result && hasNEON()) {
@@ -963,8 +963,8 @@ bool SDL_LowerSoftStretchNearest(SDL_Surface *s, const SDL_Rect *srcrect, SDL_Su
int dst_pitch = d->pitch;
int bpp = SDL_BYTESPERPIXEL(d->format);

  • Uint32 *src = (Uint32 *)((Uint8 *)s->pixels + srcrect->x * bpp + srcrect->y * src_pitch);
  • Uint32 *dst = (Uint32 *)((Uint8 *)d->pixels + dstrect->x * bpp + dstrect->y * dst_pitch);
  • Uint32 *src = (Uint32 *)((Uint8 *)s->pixels + srcrect->x * bpp + srcrect->y * (Uint64)src_pitch);

  • Uint32 *dst = (Uint32 *)((Uint8 *)d->pixels + dstrect->x * bpp + dstrect->y * (Uint64)dst_pitch);

    if (bpp == 4) {
    return scale_mat_nearest_4(src, src_w, src_h, src_pitch, dst, dst_w, dst_h, dst_pitch);