PSP renderer: use colors from 'draw' union (very likely, but un-tested)
authorSylvain Becker <sylvain.becker@gmail.com>
Sat, 29 Dec 2018 17:59:34 +0100
changeset 124867c0e0a340fc2
parent 12485 c3bc7d1f4179
child 12487 b2422f30f0a6
PSP renderer: use colors from 'draw' union (very likely, but un-tested)
src/render/psp/SDL_render_psp.c
     1.1 --- a/src/render/psp/SDL_render_psp.c	Sat Dec 29 16:37:44 2018 +0100
     1.2 +++ b/src/render/psp/SDL_render_psp.c	Sat Dec 29 17:59:34 2018 +0100
     1.3 @@ -741,10 +741,10 @@
     1.4              case SDL_RENDERCMD_DRAW_POINTS: {
     1.5                  const size_t count = cmd->data.draw.count;
     1.6                  const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first);
     1.7 -                const Uint8 r = cmd->data.color.r;
     1.8 -                const Uint8 g = cmd->data.color.g;
     1.9 -                const Uint8 b = cmd->data.color.b;
    1.10 -                const Uint8 a = cmd->data.color.a;
    1.11 +                const Uint8 r = cmd->data.draw.r;
    1.12 +                const Uint8 g = cmd->data.draw.g;
    1.13 +                const Uint8 b = cmd->data.draw.b;
    1.14 +                const Uint8 a = cmd->data.draw.a;
    1.15                  const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
    1.16                  /* !!! FIXME: we could cache draw state like color, texturing, etc */
    1.17                  sceGuColor(color);
    1.18 @@ -759,10 +759,10 @@
    1.19              case SDL_RENDERCMD_DRAW_LINES: {
    1.20                  const size_t count = cmd->data.draw.count;
    1.21                  const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first);
    1.22 -                const Uint8 r = cmd->data.color.r;
    1.23 -                const Uint8 g = cmd->data.color.g;
    1.24 -                const Uint8 b = cmd->data.color.b;
    1.25 -                const Uint8 a = cmd->data.color.a;
    1.26 +                const Uint8 r = cmd->data.draw.r;
    1.27 +                const Uint8 g = cmd->data.draw.g;
    1.28 +                const Uint8 b = cmd->data.draw.b;
    1.29 +                const Uint8 a = cmd->data.draw.a;
    1.30                  const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
    1.31                  /* !!! FIXME: we could cache draw state like color, texturing, etc */
    1.32                  sceGuColor(color);
    1.33 @@ -777,10 +777,10 @@
    1.34              case SDL_RENDERCMD_FILL_RECTS: {
    1.35                  const size_t count = cmd->data.draw.count;
    1.36                  const VertV *verts = (VertV *) (gpumem + cmd->data.draw.first);
    1.37 -                const Uint8 r = cmd->data.color.r;
    1.38 -                const Uint8 g = cmd->data.color.g;
    1.39 -                const Uint8 b = cmd->data.color.b;
    1.40 -                const Uint8 a = cmd->data.color.a;
    1.41 +                const Uint8 r = cmd->data.draw.r;
    1.42 +                const Uint8 g = cmd->data.draw.g;
    1.43 +                const Uint8 b = cmd->data.draw.b;
    1.44 +                const Uint8 a = cmd->data.draw.a;
    1.45                  const Uint32 color = ((a << 24) | (b << 16) | (g << 8) | r);
    1.46                  /* !!! FIXME: we could cache draw state like color, texturing, etc */
    1.47                  sceGuColor(color);