commit 00154db
Devine Lu Linvega
·
2025-04-09 03:18:49 +0000 UTC
parent 238575e
Free ximage
1 files changed,
+3,
-1
+3,
-1
1@@ -86,14 +86,16 @@ emu_resize(void)
2 {
3 int width = uxn_screen.width * uxn_screen.zoom;
4 int height = uxn_screen.height * uxn_screen.zoom;
5+ XResizeWindow(display, window, width, height);
6 uxn_screen.pixels = realloc(uxn_screen.pixels,
7 uxn_screen.width * uxn_screen.height * sizeof(Uint32) * uxn_screen.zoom * uxn_screen.zoom);
8+ if(ximage)
9+ free(ximage);
10 ximage = XCreateImage(display, DefaultVisual(display, 0), DefaultDepth(display, DefaultScreen(display)), ZPixmap, 0, (char *)uxn_screen.pixels, width, height, 32, 0);
11 uxn_screen.x1 = uxn_screen.y1 = 0;
12 uxn_screen.x2 = uxn_screen.width;
13 uxn_screen.y2 = uxn_screen.height;
14 emu_repaint();
15- XResizeWindow(display, window, width, height);
16 }
17
18 static void