Browse Source

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

Alex Szpakowski 6 years ago
parent
commit
ff7888e698
1 changed files with 4 additions and 7 deletions
  1. 4 7
      src/render/SDL_render.c

+ 4 - 7
src/render/SDL_render.c

@@ -410,13 +410,10 @@ QueueCmdClear(SDL_Renderer *renderer)
 static int
 static int
 PrepQueueCmdDraw(SDL_Renderer *renderer, const Uint8 r, const Uint8 g, const Uint8 b, const Uint8 a)
 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) {
     if (retval == 0 && !renderer->viewport_queued) {
         retval = QueueCmdSetViewport(renderer);
         retval = QueueCmdSetViewport(renderer);
     }
     }