[planetblupi] 08/13: Fix first texture loading on OSX where it was possible to have garbage

Didier Raboud odyx at moszumanska.debian.org
Tue Feb 6 19:50:10 UTC 2018


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository planetblupi.

commit 8bfafd3e4e7165eb0c747a3216f40e120505fb9d
Author: Mathieu Schroeter <schroeter at epsitec.ch>
Date:   Mon Feb 5 18:14:21 2018 +0100

    Fix first texture loading on OSX where it was possible to have garbage
    
    The cache ensures that the texture is cleared after the rendering.
---
 src/pixmap.cxx | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/pixmap.cxx b/src/pixmap.cxx
index e62fa34..aef25d1 100644
--- a/src/pixmap.cxx
+++ b/src/pixmap.cxx
@@ -257,13 +257,11 @@ CPixmap::Cache (
     SDL_SetTextureBlendMode (
       m_SDLTextureInfo[channel].texture, SDL_BLENDMODE_BLEND);
   }
-  else
-  {
-    SDL_SetRenderTarget (g_renderer, m_SDLTextureInfo[channel].texture);
-    SDL_SetRenderDrawColor (g_renderer, 0, 0, 0, 0);
-    SDL_RenderClear (g_renderer);
-    SDL_SetRenderTarget (g_renderer, nullptr);
-  }
+
+  SDL_SetRenderTarget (g_renderer, m_SDLTextureInfo[channel].texture);
+  SDL_SetRenderDrawColor (g_renderer, 0, 0, 0, 0);
+  SDL_RenderClear (g_renderer);
+  SDL_SetRenderTarget (g_renderer, nullptr);
 
   m_SDLTextureInfo[channel].texMask  = channel == CHMASK2 ? texture : nullptr;
   m_SDLTextureInfo[channel].target   = true;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/planetblupi.git



More information about the Pkg-games-commits mailing list