commit 9f3c70e

Devine Lu Linvega  ·  2026-01-07 17:39:29 +0000 UTC
parent 05d6556
Store screen sizes once
1 files changed,  +2, -4
+2, -4
 1@@ -464,7 +464,9 @@ screen_resize(int width, int height)
 2 	if(width != screen_width || height != screen_height) {
 3 		int length;
 4 		screen_width = width, screen_wmar2 = width + 0x10;
 5+		dev[0x22] = screen_width >> 8, dev[0x23] = screen_width;
 6 		screen_height = height, screen_hmar2 = height + 0x10;
 7+		dev[0x24] = screen_height >> 8, dev[0x25] = screen_height;
 8 		length = screen_wmar2 * screen_hmar2;
 9 		screen_layers = realloc(screen_layers, length);
10 		memset(screen_layers, 0, length);
11@@ -998,10 +1000,6 @@ emu_dei(const Uint8 port)
12 	case CMD_LIVE:
13 	case CMD_EXIT: check_child(); break;
14 	/* Screen */
15-	case 0x22: return screen_width >> 8;
16-	case 0x23: return screen_width;
17-	case 0x24: return screen_height >> 8;
18-	case 0x25: return screen_height;
19 	case 0x28: return rX >> 8;
20 	case 0x29: return rX;
21 	case 0x2a: return rY >> 8;