summaryrefslogtreecommitdiff
path: root/sys/src/games/gba/gba.c
diff options
context:
space:
mode:
authorqwx <devnull@localhost>2018-03-31 11:37:25 +0200
committerqwx <devnull@localhost>2018-03-31 11:37:25 +0200
commit84351ae4cb50857fe62e0938198db0c7ea33d05c (patch)
tree5668cb88ee76fe73663e389039e244aaf522795d /sys/src/games/gba/gba.c
parent2fdd83c82779fa108ae435bee1cae6d68243c75b (diff)
blit,c64,gb*: fix phaser coolant leak during resize
Diffstat (limited to 'sys/src/games/gba/gba.c')
-rw-r--r--sys/src/games/gba/gba.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/games/gba/gba.c b/sys/src/games/gba/gba.c
index 50300af0b..8457b1e6f 100644
--- a/sys/src/games/gba/gba.c
+++ b/sys/src/games/gba/gba.c
@@ -218,8 +218,8 @@ screeninit(void)
p = divpt(addpt(screen->r.min, screen->r.max), 2);
picr = (Rectangle){subpt(p, Pt(scale * 120, scale * 80)), addpt(p, Pt(scale * 120, scale * 80))};
+ freeimage(tmp);
tmp = allocimage(display, Rect(0, 0, scale * 240, scale > 1 ? 1 : scale * 160), CHAN4(CIgnore, 1, CBlue, 5, CGreen, 5, CRed, 5), scale > 1, 0);
- bg = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0xCCCCCCFF);
draw(screen, screen->r, bg, nil, ZP);
}
@@ -443,6 +443,7 @@ threadmain(int argc, char **argv)
if(mc == nil)
sysfatal("initmouse: %r");
proccreate(keyproc, nil, mainstacksize);
+ bg = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0xCCCCCCFF);
screeninit();
eventinit();