Skip to content

Commit 2390d2d

Browse files
committed
MGA: Do not reset DWORD expected counter while SOFTRAP read is still pending
Fixes Matrox Simple Interface games without breaking Windows 2000 drivers
1 parent 996530a commit 2390d2d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/video/vid_mga.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2186,7 +2186,10 @@ mystique_ctrl_write_b(uint32_t addr, uint8_t val, void *priv)
21862186
thread_wait_mutex(mystique->dma.lock);
21872187
WRITE8(addr, mystique->dma.primaddress, val);
21882188
mystique->dma.pri_state = 0;
2189-
mystique->dma.words_expected = 0;
2189+
if (mystique->dma.state == DMA_STATE_IDLE && !(mystique->softrap_pending || mystique->endprdmasts_pending || !mystique->softrap_status_read)) {
2190+
mystique->dma.words_expected = 0;
2191+
}
2192+
mystique->dma.state = DMA_STATE_IDLE;
21902193
thread_release_mutex(mystique->dma.lock);
21912194
break;
21922195

0 commit comments

Comments
 (0)