From 03a578708cea93ab02e67d0215b73dd360dd8a2a Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Tue, 7 Mar 2023 22:03:04 +0600 Subject: [PATCH] vid_mga: Make Matrox Millennium multi-monitor compatible --- src/video/vid_mga.c | 4 ++-- src/video/vid_table.c | 2 +- src/video/vid_tvp3026_ramdac.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video/vid_mga.c b/src/video/vid_mga.c index a70a9552d..50ed4f5a3 100644 --- a/src/video/vid_mga.c +++ b/src/video/vid_mga.c @@ -5126,9 +5126,9 @@ mystique_hwcursor_draw(svga_t *svga, int displine) case XCURCTRL_CURMODE_XGA: for (x = 0; x < 64; x++) { if (!(dat[1] & (1ull << 63))) - buffer32->line[displine][offset + svga->x_add] = (dat[0] & (1ull << 63)) ? mystique->cursor.col[1] : mystique->cursor.col[0]; + svga->monitor->target_buffer->line[displine][offset + svga->x_add] = (dat[0] & (1ull << 63)) ? mystique->cursor.col[1] : mystique->cursor.col[0]; else if (dat[0] & (1ull << 63)) - buffer32->line[displine][offset + svga->x_add] ^= 0xffffff; + svga->monitor->target_buffer->line[displine][offset + svga->x_add] ^= 0xffffff; offset++; dat[0] <<= 1; diff --git a/src/video/vid_table.c b/src/video/vid_table.c index fb6624ced..e4b53978b 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -199,7 +199,7 @@ video_cards[] = { { &s3_diamond_stealth_4000_pci_device }, { &s3_trio3d2x_pci_device }, #if defined(DEV_BRANCH) && defined(USE_MGA) - { &millennium_device }, + { &millennium_device, VIDEO_FLAG_TYPE_SPECIAL }, { &mystique_device }, { &mystique_220_device }, #endif diff --git a/src/video/vid_tvp3026_ramdac.c b/src/video/vid_tvp3026_ramdac.c index 148c9b748..783b52abf 100644 --- a/src/video/vid_tvp3026_ramdac.c +++ b/src/video/vid_tvp3026_ramdac.c @@ -489,7 +489,7 @@ tvp3026_hwcursor_draw(svga_t *svga, int displine) y_pos = displine; x_pos = offset + svga->x_add; - p = buffer32->line[y_pos]; + p = svga->monitor->target_buffer->line[y_pos]; if (offset >= svga->dac_hwcursor_latch.x) { switch (mode) {