From ec06fcc410740db1b29f89e0661c9554806dc9d6 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Fri, 3 Mar 2017 07:34:58 +0100 Subject: [PATCH] Set the texture props each Cache calls --- src/pixmap.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pixmap.cxx b/src/pixmap.cxx index dd30834..38da1ca 100644 --- a/src/pixmap.cxx +++ b/src/pixmap.cxx @@ -200,11 +200,6 @@ bool CPixmap::Cache (size_t channel, const char *pFilename, POINT totalDim, return false; } - m_SDLTextureInfo[channel].target = true; - m_SDLTextureInfo[channel].dimIcon = iconDim; - m_SDLTextureInfo[channel].dimTotal = totalDim; - m_SDLTextureInfo[channel].file = pFilename; - SDL_SetTextureBlendMode (m_SDLTextureInfo[channel].texture, SDL_BLENDMODE_BLEND); } @@ -216,6 +211,11 @@ bool CPixmap::Cache (size_t channel, const char *pFilename, POINT totalDim, SDL_SetRenderTarget (g_renderer, nullptr); } + m_SDLTextureInfo[channel].target = true; + m_SDLTextureInfo[channel].dimIcon = iconDim; + m_SDLTextureInfo[channel].dimTotal = totalDim; + m_SDLTextureInfo[channel].file = pFilename; + SDL_SetRenderTarget (g_renderer, m_SDLTextureInfo[channel].texture); SDL_RenderCopy (g_renderer, texture, nullptr, nullptr); SDL_SetRenderTarget (g_renderer, nullptr);