bg scaling fix

This commit is contained in:
p.kosyh 2010-02-08 17:19:45 +00:00
parent 9b908d86bd
commit d593275c3e

View file

@ -287,8 +287,6 @@ static int game_theme_scale(int w, int h)
static int theme_gfx_scale(void) static int theme_gfx_scale(void)
{ {
struct game_theme *t = &game_theme; struct game_theme *t = &game_theme;
if (t->scale == 1.0f)
return 0;
if (theme_img_scale(&t->a_up) || if (theme_img_scale(&t->a_up) ||
theme_img_scale(&t->a_down) || theme_img_scale(&t->a_down) ||
theme_img_scale(&t->inv_a_up) || theme_img_scale(&t->inv_a_up) ||
@ -307,6 +305,7 @@ static int theme_gfx_scale(void)
xoff = 0; xoff = 0;
if (yoff < 0) if (yoff < 0)
yoff = 0; yoff = 0;
if (t->scale != 1.0f || xoff || yoff) {
pic = gfx_new(t->w, t->h); pic = gfx_new(t->w, t->h);
if (!pic) if (!pic)
return -1; return -1;
@ -317,6 +316,7 @@ static int theme_gfx_scale(void)
gfx_free_image(t->bg); gfx_free_image(t->bg);
t->bg = pic; t->bg = pic;
} }
}
return 0; return 0;
} }