From af01668b344d7bc27987c788f3fe7cd18bd6ea88 Mon Sep 17 00:00:00 2001 From: Sjoerd van der Berg Date: Sun, 5 Jan 2003 12:08:49 +0000 Subject: [PATCH] New async rendering. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@620 --- src/hardware/vga.cpp | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/hardware/vga.cpp b/src/hardware/vga.cpp index b62dd7e3..1bf84581 100644 --- a/src/hardware/vga.cpp +++ b/src/hardware/vga.cpp @@ -39,12 +39,24 @@ Bit32u FillTable[16]={ 0xffff0000,0xffff00ff,0xffffff00,0xffffffff }; +static void EndRetrace(void) { + /* start the actual display update now */ + RENDER_DoUpdate(); + vga.config.retrace=false; +} -static void VGA_BlankTimer(void) { - PIC_AddEvent(&VGA_BlankTimer,vga.draw.blank); +static void VGA_BlankTimer() { + PIC_AddEvent(VGA_BlankTimer,vga.draw.blank); + PIC_AddEvent(EndRetrace,667); + /* Setup a timer to destroy the vertical retrace bit in a few microseconds */ + vga.config.real_start=vga.config.display_start; + vga.config.retrace=true; +} + +static void VGA_DrawHandler(RENDER_Part_Handler part_handler) { Bit8u * buf,* bufsplit; /* Draw the current frame */ - if (!vga.draw.resizing && RENDER_StartUpdate()) { + if (!vga.draw.resizing) { if (vga.config.line_compare