From 2d6ffe081e7c9f161e7414179bbaada40ef7f057 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Thu, 21 Dec 2023 14:40:32 +0600 Subject: [PATCH] Matrox Mystique: Force window resizing --- src/video/vid_mga.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index 498f2ff9c..de6b1594f 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -717,10 +717,12 @@ mystique_out(uint16_t addr, uint8_t val, void *priv) mystique->crtcext_idx = val; break; case 0x3df: - if (mystique->crtcext_idx < 6) - mystique->crtcext_regs[mystique->crtcext_idx] = val; if (mystique->crtcext_idx == 1) svga->dpms = !!(val & 0x30); + if (mystique->crtcext_idx < 6) { + mystique->crtcext_regs[mystique->crtcext_idx] = val; + svga_recalctimings(&mystique->svga); + } if (mystique->crtcext_idx == 4) { if (svga->gdcreg[6] & 0xc) { /*64k banks*/ @@ -952,6 +954,8 @@ mystique_recalctimings(svga_t *svga) svga->fb_only = svga->packed_chain4; svga->disable_blink = (svga->bpp > 4); + reset_screen_size(); + video_force_resize_set_monitor(1, svga->monitor_index); #if 0 pclog("PackedChain4=%d, chain4=%x, fast=%x, bit6 attrreg10=%02x, bits 5-6 gdcreg5=%02x, extmode=%02x.\n", svga->packed_chain4, svga->chain4, svga->fast, svga->attrregs[0x10] & 0x40, svga->gdcreg[5] & 0x60, mystique->pci_regs[0x41] & 1, mystique->crtcext_regs[3] & CRTCX_R3_MGAMODE); #endif