GetScaledExtent truncation prevention now only triggers if original w/h

!= 0


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@883 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2003-03-13 14:48:31 +00:00
parent 01569aab89
commit 7d46626f9a
+2 -2
View File
@@ -273,9 +273,9 @@ TFB_DrawCanvas_GetScaledExtent (TFB_Canvas src_canvas, int scale, PEXTENT size)
SDL_Surface *src = (SDL_Surface *)src_canvas; SDL_Surface *src = (SDL_Surface *)src_canvas;
size->width = (int) (src->w * scale / (float)GSCALE_IDENTITY); size->width = (int) (src->w * scale / (float)GSCALE_IDENTITY);
size->height = (int) (src->h * scale / (float)GSCALE_IDENTITY); size->height = (int) (src->h * scale / (float)GSCALE_IDENTITY);
if (!size->width) if (!size->width && src->w)
size->width = 1; size->width = 1;
if (!size->height) if (!size->height && src->h)
size->height = 1; size->height = 1;
} }