Skip to content

Commit

Permalink
render: fix colors not being set properly after the previous change
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Aug 18, 2019
1 parent 1be03b4 commit ff7888e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/render/SDL_render.c
Expand Up @@ -410,13 +410,10 @@ QueueCmdClear(SDL_Renderer *renderer)
static int
PrepQueueCmdDraw(SDL_Renderer *renderer, const Uint8 r, const Uint8 g, const Uint8 b, const Uint8 a)
{
/* Guarantee that the draw color, viewport, and clip rect are set before
* draws, so the backends don't have to worry about that state not being
* valid at draw time. */
int retval = 0;
if (retval == 0 && !renderer->color_queued) {
retval = QueueCmdSetDrawColor(renderer, r, g, b, a);
}
int retval = QueueCmdSetDrawColor(renderer, r, g, b, a);

/* Set the viewport and clip rect directly before draws, so the backends
* don't have to worry about that state not being valid at draw time. */
if (retval == 0 && !renderer->viewport_queued) {
retval = QueueCmdSetViewport(renderer);
}
Expand Down

0 comments on commit ff7888e

Please sign in to comment.