From 17865d84bc9f24d19008149ba5c8cbe2ab0d66f6 Mon Sep 17 00:00:00 2001 From: SarahW Date: Thu, 26 May 2016 21:38:21 +0100 Subject: [PATCH] If Voodoo FIFO is full and FIFO thread is waiting for swap to complete, process swap immediately. Fixes hangs in Carmageddon and TOCA 2. --- src/vid_voodoo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vid_voodoo.c b/src/vid_voodoo.c index 4aabfbb..6d83fd3 100644 --- a/src/vid_voodoo.c +++ b/src/vid_voodoo.c @@ -2681,7 +2681,7 @@ static void voodoo_reg_writel(uint32_t addr, uint32_t val, void *p) { thread_wait_event(voodoo->wake_fifo_thread, -1); thread_reset_event(voodoo->wake_fifo_thread); - if (voodoo->swap_pending && voodoo->flush) + if ((voodoo->swap_pending && voodoo->flush) || FIFO_ENTRIES == 65536) { /*Main thread is waiting for FIFO to empty, so skip vsync wait and just swap*/ memset(voodoo->dirty_line, 1, 1024);