Skip to content

Commit 4145fc3

Browse files
authored
added @ankith suggestion
1 parent c739cf2 commit 4145fc3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src_c/alphablit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2842,7 +2842,7 @@ premul_surf_color_by_alpha(SDL_Surface *src, SDL_Surface *dst)
28422842
#if !defined(__EMSCRIPTEN__)
28432843
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
28442844
if ((PG_SURF_BytesPerPixel(src) == 4) &&
2845-
(src->pitch % PG_SURF_BytesPerPixel(src) == 0) && pg_has_avx2()) {
2845+
(src->pitch == (src->w * PG_SURF_BytesPerPixel(src))) && pg_has_avx2()) {
28462846
premul_surf_color_by_alpha_avx2(src, dst);
28472847
return 0;
28482848
}

0 commit comments

Comments
 (0)