Fake line sweeping of the monitor.
This commit is contained in:
parent
1645ab0492
commit
171c9420c2
|
@ -1010,9 +1010,20 @@ HRESULT WINAPI
|
|||
Main_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine)
|
||||
{
|
||||
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
|
||||
FIXME("(%p)->(%p)\n", This, lpdwScanLine);
|
||||
static BOOL hide;
|
||||
|
||||
*lpdwScanLine = 1;
|
||||
/* Since this method is called often, show the fixme only once */
|
||||
if (!hide) {
|
||||
FIXME("(%p)->(%p) semi-stub\n", This, lpdwScanLine);
|
||||
hide = TRUE;
|
||||
}
|
||||
|
||||
/* Fake the line sweeping of the monitor */
|
||||
/* FIXME: We should synchronize with a source to keep the refresh rate */
|
||||
*lpdwScanLine = This->cur_scanline++;
|
||||
/* Assume 20 scan lines in the vertical blank */
|
||||
if (This->cur_scanline >= This->height + 20)
|
||||
This->cur_scanline = 0;
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ struct IDirectDrawImpl
|
|||
DWORD width, height;
|
||||
LONG pitch;
|
||||
DDPIXELFORMAT pixelformat;
|
||||
DWORD cur_scanline;
|
||||
|
||||
/* Should each of these go into some structure? */
|
||||
DWORD orig_width, orig_height;
|
||||
|
|
Loading…
Reference in New Issue