Mail Archives: djgpp/1996/12/30/14:08:51
>I am new to djgpp and programming. Can some1 help me write a function to
>dectect a vertical retrace.
void WaitVSync()
{
while ( inp(0x3DA) & 0x08) {}
while (!inp(0x3DA) & 0x08) {}
}
This is slow, because it first waits vert. ret. to be on, and start
again. So you can remove second line if you want, but then if vertical
retrace were just about to stop there isn't enough time to copy double
buffer to screen. And it flickers, but not much.
Aleksi Kallio
- Raw text -