summaryrefslogtreecommitdiff
path: root/sys/src/games/gb/gb.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/gb/gb.c
parent2fdd83c82779fa108ae435bee1cae6d68243c75b (diff)
blit,c64,gb*: fix phaser coolant leak during resize
Diffstat (limited to 'sys/src/games/gb/gb.c')
-rw-r--r--sys/src/games/gb/gb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/games/gb/gb.c b/sys/src/games/gb/gb.c
index 4a021f7e4..d6762b182 100644
--- a/sys/src/games/gb/gb.c
+++ b/sys/src/games/gb/gb.c
@@ -210,8 +210,8 @@ screeninit(void)
p = divpt(addpt(screen->r.min, screen->r.max), 2);
picr = (Rectangle){subpt(p, Pt(scale * PICW/2, scale * PICH/2)), addpt(p, Pt(scale * PICW/2, scale * PICH/2))};
+ freeimage(tmp);
tmp = allocimage(display, Rect(0, 0, scale * PICW, scale > 1 ? 1 : scale * PICH), XRGB32, scale > 1, 0);
- bg = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0xCCCCCCFF);
draw(screen, screen->r, bg, nil, ZP);
}
@@ -467,6 +467,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();