Explorar el Código

Use srcpixel now that we've set it

Sam Lantinga hace 4 meses
padre
commit
3489a45216
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/render/software/SDL_triangle.c

+ 1 - 1
src/render/software/SDL_triangle.c

@@ -803,7 +803,7 @@ static void SDL_BlitTriangle_Slow(SDL_BlitInfo *info,
         src = (info->src + (srcy * info->src_pitch) + (srcx * srcbpp));
         src = (info->src + (srcy * info->src_pitch) + (srcx * srcbpp));
         if (FORMAT_INDEXED(srcfmt_val)) {
         if (FORMAT_INDEXED(srcfmt_val)) {
             srcpixel = *src;
             srcpixel = *src;
-            const SDL_Color *color = &palette->colors[*src];
+            const SDL_Color *color = &palette->colors[srcpixel];
             srcR = color->r;
             srcR = color->r;
             srcG = color->g;
             srcG = color->g;
             srcB = color->b;
             srcB = color->b;