commit 238575e

Devine Lu Linvega  ·  2025-04-09 03:08:22 +0000 UTC
parent e2f6f63
Removed resize flag
3 files changed,  +4, -6
+1, -1
1@@ -74,7 +74,7 @@ screen_apply(int width, int height)
2 	uxn_screen.bg = realloc(uxn_screen.bg, length), uxn_screen.fg = realloc(uxn_screen.fg, length);
3 	uxn_screen.width = width, uxn_screen.height = height;
4 	screen_change(0, 0, width, height);
5-	uxn_screen.resize = 1;
6+	emu_resize();
7 }
8 
9 void
+2, -1
 1@@ -10,12 +10,13 @@ WITH REGARD TO THIS SOFTWARE.
 2 */
 3 
 4 typedef struct UxnScreen {
 5-	int width, height, resize, vector, zoom, x1, y1, x2, y2;
 6+	int width, height, vector, zoom, x1, y1, x2, y2;
 7 	Uint32 palette[16], *pixels;
 8 	Uint8 *fg, *bg;
 9 } UxnScreen;
10 
11 extern UxnScreen uxn_screen;
12+extern void emu_resize(void);
13 void screen_change(int x1, int y1, int x2, int y2);
14 int screen_changed(void);
15 void screen_palette(void);
+1, -4
 1@@ -94,7 +94,6 @@ emu_resize(void)
 2 	uxn_screen.y2 = uxn_screen.height;
 3 	emu_repaint();
 4 	XResizeWindow(display, window, width, height);
 5-	uxn_screen.resize = 0;
 6 }
 7 
 8 static void
 9@@ -225,8 +224,8 @@ display_init(void)
10 	XStoreName(display, window, "uxn11");
11 	XSetClassHint(display, window, &class);
12 	XMapWindow(display, window);
13-	screen_apply(WIDTH, HEIGHT);
14 	uxn_screen.zoom = 1;
15+	screen_apply(WIDTH, HEIGHT);
16 	return 1;
17 }
18 
19@@ -251,8 +250,6 @@ emu_run(void)
20 			emu_event();
21 		if(poll(&fds[1], 1, 0)) {
22 			read(fds[1].fd, expirations, 8);
23-			if(uxn_screen.resize)
24-				emu_resize();
25 			if(uxn_screen.vector)
26 				uxn_eval(uxn_screen.vector);
27 			if(uxn_screen.x2 && uxn_screen.y2 && screen_changed())