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