render: fix colors not being set properly after the previous change

This commit is contained in:
Alex Szpakowski 2019-08-18 09:35:11 -03:00
parent 1be03b4089
commit ff7888e698
1 changed files with 4 additions and 7 deletions

View File

@ -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);
}