cleanup
This commit is contained in:
@@ -261,17 +261,16 @@ void RageBitmapTexture::Create(
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (m_iImageWidth != m_iTextureWidth || m_iImageHeight != m_iTextureHeight) {
|
while (m_iImageWidth != m_iTextureWidth || m_iImageHeight != m_iTextureHeight) {
|
||||||
SDL_Surface *dst;
|
|
||||||
|
|
||||||
float xscale = float(m_iTextureWidth)/m_iImageWidth;
|
float xscale = float(m_iTextureWidth)/m_iImageWidth;
|
||||||
float yscale = float(m_iTextureHeight)/m_iImageHeight;
|
float yscale = float(m_iTextureHeight)/m_iImageHeight;
|
||||||
/* Our simple filter is a simple linear filter, so it can't
|
|
||||||
* scale to less than .5 very well. If we need to go lower
|
/* Our filter is a simple linear filter, so it can't scale to
|
||||||
* than .5, do it iteratively. */
|
* less than .5 very well. If we need to go lower than .5, do
|
||||||
|
* it iteratively. */
|
||||||
xscale = max(xscale, .5f);
|
xscale = max(xscale, .5f);
|
||||||
yscale = max(yscale, .5f);
|
yscale = max(yscale, .5f);
|
||||||
|
|
||||||
dst = zoomSurface(img, xscale, yscale);
|
SDL_Surface *dst = zoomSurface(img, xscale, yscale);
|
||||||
|
|
||||||
SDL_FreeSurface(img);
|
SDL_FreeSurface(img);
|
||||||
img = dst;
|
img = dst;
|
||||||
|
|||||||
Reference in New Issue
Block a user