commit 381c892

Devine Lu Linvega  ·  2026-06-14 17:39:12 +0000 UTC
parent 0799c4b
Fixed flicker during resie
1 files changed,  +3, -1
+3, -1
 1@@ -1100,6 +1100,7 @@ emu_redraw(void)
 2 	const int w = screen_width * screen_zoom;
 3 	const int h = screen_height * screen_zoom;
 4 	XPutImage(emu_dpy, emu_win, DefaultGC(emu_dpy, 0), emu_img, 0, 0, 0, 0, w, h);
 5+	XFlush(emu_dpy);
 6 }
 7 
 8 static void
 9@@ -1212,7 +1213,7 @@ emu_event(void)
10 	XNextEvent(emu_dpy, &ev);
11 	switch(ev.type) {
12 	case Expose:
13-		screen_reqdraw = 1;
14+		screen_redraw();
15 		break;
16 	case ClientMessage:
17 		dev[0x0f] = 0x80;
18@@ -1344,6 +1345,7 @@ main(int argc, char **argv)
19 	if(!dev[0x0f]) {
20 		if(!emu_init())
21 			return !fprintf(stdout, "Could not initialize %s.\n", argv[0]);
22+		screen_update();
23 		emu_run();
24 	}
25 	return dev[0x0f] & 0x7f;