ddraw: Improve GetScanLine stub so it's usable for timing related tasks
Piotr Caban
piotr at codeweavers.com
Fri Apr 6 06:45:36 CDT 2012
On 04/06/12 13:33, Christian Costa wrote:
> Le 06/04/2012 12:35, Piotr Caban a écrit :
>> + /* Simulate a 60Hz display */
>> + time = GetTickCount();
>> + frame_progress = time& 15; /* time % (1000 / 60) */
>> + if (!frame_progress)
>> + {
>> + *Scanline = 0;
>> + return DDERR_VERTICALBLANKINPROGRESS;
>> + }
>> +
>> + /* convert frame_progress to estimated scan line */
>> + lines = mode.height / 15;
>> + *Scanline = (frame_progress - 1) * lines + time % lines;
>> return DD_OK;
>> }
>
> Is time % lines here is to generate a random values (sort of noise) ?
Yes. It's mainly there to make the function return more then 16
different values. But it's not guarantying that all of the lines may be
ever returned.
More information about the wine-devel
mailing list