1 /* $Id: main.c 21434 2006-04-01 19:12:56Z greatlrd $
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: lib/ddraw/ddraw.c
6 * PURPOSE: DirectDraw Library
7 * PROGRAMMER: Magnus Olsen (greatlrd)
14 DDRAWI_DIRECTDRAW_GBL ddgbl
;
15 DDRAWI_DDRAWSURFACE_GBL ddSurfGbl
;
22 Create_DirectDraw (LPGUID pGUID
, LPDIRECTDRAW
* pIface
,
25 LPDDRAWI_DIRECTDRAW_INT This
;
29 if ((IsBadReadPtr(pIface
,sizeof(LPDIRECTDRAW
))) ||
30 (IsBadWritePtr(pIface
,sizeof(LPDIRECTDRAW
))))
32 return DDERR_INVALIDPARAMS
;
35 This
= (LPDDRAWI_DIRECTDRAW_INT
)*pIface
;
37 /* fixme linking too second link when we shall not doing it */
38 if (IsBadReadPtr(This
,sizeof(LPDIRECTDRAW
)))
40 /* We do not have a DirectDraw interface, we need alloc it*/
41 LPDDRAWI_DIRECTDRAW_INT memThis
;
43 DX_STUB_str("1. no linking\n");
45 DxHeapMemAlloc(memThis
, sizeof(DDRAWI_DIRECTDRAW_INT
));
48 return DDERR_OUTOFMEMORY
;
53 /* Fixme release memory alloc if we fail */
55 DxHeapMemAlloc(This
->lpLcl
, sizeof(DDRAWI_DIRECTDRAW_LCL
));
56 if (This
->lpLcl
== NULL
)
58 return DDERR_OUTOFMEMORY
;
63 /* We got the DirectDraw interface alloc and we need create the link */
64 LPDDRAWI_DIRECTDRAW_INT newThis
;
66 DX_STUB_str("2.linking\n");
68 /* step 1.Alloc the new DDRAWI_DIRECTDRAW_INT for the lnking */
69 DxHeapMemAlloc(newThis
, sizeof(DDRAWI_DIRECTDRAW_INT
));
72 return DDERR_OUTOFMEMORY
;
75 /* step 2 check if it not DDCREATE_HARDWAREONLY we got if so we fail */
76 if ((pGUID
) && (pGUID
!= (LPGUID
)DDCREATE_HARDWAREONLY
))
81 return DDERR_INVALIDDIRECTDRAWGUID
;
85 /* step 3 do the link the old interface are store in the new one */
86 newThis
->lpLink
= This
;
88 /* step 4 we need create new local directdraw struct for the new linked interface */
89 DxHeapMemAlloc(newThis
->lpLcl
, sizeof(DDRAWI_DIRECTDRAW_LCL
));
90 if (newThis
->lpLcl
== NULL
)
93 return DDERR_OUTOFMEMORY
;
99 This
->lpLcl
->lpGbl
= &ddgbl
;
101 *pIface
= (LPDIRECTDRAW
)This
;
103 /* Get right interface we whant */
104 if (Main_DirectDraw_QueryInterface((LPDIRECTDRAW7
)This
, id
, (void**)&pIface
) == DD_OK
)
106 DX_STUB_str("Got iface\n");
108 if (StartDirectDraw((LPDIRECTDRAW
)This
, pGUID
, FALSE
) == DD_OK
);
111 RtlZeroMemory(&wnd_class, sizeof(wnd_class));
112 wnd_class.style = CS_HREDRAW | CS_VREDRAW;
113 wnd_class.lpfnWndProc = DefWindowProcW;
114 wnd_class.cbClsExtra = 0;
115 wnd_class.cbWndExtra = 0;
116 wnd_class.hInstance = GetModuleHandleW(0);
118 wnd_class.hCursor = 0;
119 wnd_class.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
120 wnd_class.lpszMenuName = NULL;
121 wnd_class.lpszClassName = classname;
122 if(!RegisterClassW(&wnd_class))
124 DX_STUB_str("DDERR_GENERIC");
125 return DDERR_GENERIC;
128 This
->lpLcl
->hDD
= ddgbl
.hDD
;
133 return DDERR_INVALIDPARAMS
;
138 StartDirectDraw(LPDIRECTDRAW iface
, LPGUID lpGuid
, BOOL reenable
)
140 LPDDRAWI_DIRECTDRAW_INT This
= (LPDDRAWI_DIRECTDRAW_INT
)iface
;
141 DWORD hal_ret
= DD_FALSE
;
142 DWORD hel_ret
= DD_FALSE
;
143 DWORD devicetypes
= 0;
149 * ddgbl.dwPDevice is not longer in use in windows 2000 and higher
150 * I am using it for device type
151 * devicetypes = 1 : both hal and hel are enable
152 * devicetypes = 2 : both hal are enable
153 * devicetypes = 3 : both hel are enable
154 * devicetypes = 4 :loading a guid drv from the register
157 if (reenable
== FALSE
)
159 if ((!IsBadReadPtr(This
->lpLink
,sizeof(LPDIRECTDRAW
))) && (This
->lpLink
== NULL
))
161 RtlZeroMemory(&ddgbl
, sizeof(DDRAWI_DIRECTDRAW_GBL
));
162 This
->lpLcl
->lpGbl
->dwRefCnt
++;
163 if (ddgbl
.lpDDCBtmp
== NULL
)
166 DxHeapMemAlloc( ddgbl
.lpDDCBtmp
, sizeof(DDHAL_CALLBACKS
));
167 if (ddgbl
.lpDDCBtmp
== NULL
)
169 DX_STUB_str("Out of memmory\n");
176 DX_STUB_str("here\n");
178 if (reenable
== FALSE
)
182 DX_STUB_str("lpGuid == NULL\n");
185 /* Create HDC for default, hal and hel driver */
186 This
->lpLcl
->hWnd
= (ULONG_PTR
) GetActiveWindow();
187 This
->lpLcl
->hDC
= (ULONG_PTR
) GetDC((HWND
)This
->lpLcl
->hWnd
);
189 /* cObsolete is undoc in msdn it being use in CreateDCA */
190 RtlCopyMemory(&ddgbl
.cObsolete
,&"DISPLAY",7);
191 RtlCopyMemory(&ddgbl
.cDriverName
,&"DISPLAY",7);
192 dwFlags
|= DDRAWI_DISPLAYDRV
| DDRAWI_GDIDRV
;
196 else if (lpGuid
== (LPGUID
) DDCREATE_HARDWAREONLY
)
199 /* Create HDC for default, hal driver */
200 This
->lpLcl
->hWnd
=(ULONG_PTR
) GetActiveWindow();
201 This
->lpLcl
->hDC
= (ULONG_PTR
) GetDC((HWND
)This
->lpLcl
->hWnd
);
203 /* cObsolete is undoc in msdn it being use in CreateDCA */
204 RtlCopyMemory(&ddgbl
.cObsolete
,&"DISPLAY",7);
205 RtlCopyMemory(&ddgbl
.cDriverName
,&"DISPLAY",7);
206 dwFlags
|= DDRAWI_DISPLAYDRV
| DDRAWI_GDIDRV
;
208 else if (lpGuid
== (LPGUID
) DDCREATE_EMULATIONONLY
)
212 /* Create HDC for default, hal and hel driver */
213 This
->lpLcl
->hWnd
= (ULONG_PTR
) GetActiveWindow();
214 This
->lpLcl
->hDC
= (ULONG_PTR
) GetDC((HWND
)This
->lpLcl
->hWnd
);
216 /* cObsolete is undoc in msdn it being use in CreateDCA */
217 RtlCopyMemory(&ddgbl
.cObsolete
,&"DISPLAY",7);
218 RtlCopyMemory(&ddgbl
.cDriverName
,&"DISPLAY",7);
220 dwFlags
|= DDRAWI_DISPLAYDRV
| DDRAWI_GDIDRV
;
224 /* FIXME : need getting driver from the GUID that have been pass in from
225 * the register. we do not support that yet
228 This
->lpLcl
->hDC
= (ULONG_PTR
) NULL
;
229 This
->lpLcl
->hWnd
= (ULONG_PTR
) GetActiveWindow();
232 if ( (HDC
)This
->lpLcl
->hDC
== NULL
)
234 DX_STUB_str("DDERR_OUTOFMEMORY\n");
235 return DDERR_OUTOFMEMORY
;
239 This
->lpLcl
->lpDDCB
= ddgbl
.lpDDCBtmp
;
241 /* Startup HEL and HAL */
242 This
->lpLcl
->lpDDCB
= This
->lpLcl
->lpGbl
->lpDDCBtmp
;
243 This
->lpLcl
->dwProcessId
= GetCurrentProcessId();
248 hal_ret
= StartDirectDrawHal(iface
, reenable
);
249 This
->lpLcl
->lpDDCB
->HELDD
.dwFlags
= 0;
253 hel_ret
= StartDirectDrawHel(iface
, reenable
);
254 This
->lpLcl
->lpDDCB
->HALDD
.dwFlags
= 0;
258 hal_ret
= StartDirectDrawHal(iface
, reenable
);
259 hel_ret
= StartDirectDrawHel(iface
, reenable
);
262 DX_STUB_str("return\n");
268 DX_STUB_str("DDERR_NODIRECTDRAWSUPPORT\n");
269 return DDERR_NODIRECTDRAWSUPPORT
;
271 dwFlags
|= DDRAWI_NOHARDWARE
;
276 dwFlags
|= DDRAWI_NOEMULATION
;
281 dwFlags
|= DDRAWI_EMULATIONINITIALIZED
;
284 /* Fill some basic info for Surface */
285 This
->lpLcl
->lpGbl
->dwFlags
= dwFlags
| DDRAWI_ATTACHEDTODESKTOP
;
286 This
->lpLcl
->lpDDCB
= This
->lpLcl
->lpGbl
->lpDDCBtmp
;
287 This
->lpLcl
->hDD
= ddgbl
.hDD
;
289 DX_STUB_str("DD_OK\n");
294 StartDirectDrawHel(LPDIRECTDRAW iface
, BOOL reenable
)
296 LPDDRAWI_DIRECTDRAW_INT This
= (LPDDRAWI_DIRECTDRAW_INT
)iface
;
298 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.CanCreateSurface
= HelDdCanCreateSurface
;
299 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.CreateSurface
= HelDdCreateSurface
;
300 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.CreatePalette
= HelDdCreatePalette
;
301 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.DestroyDriver
= HelDdDestroyDriver
;
302 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.FlipToGDISurface
= HelDdFlipToGDISurface
;
303 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.GetScanLine
= HelDdGetScanLine
;
304 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.SetColorKey
= HelDdSetColorKey
;
305 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.SetExclusiveMode
= HelDdSetExclusiveMode
;
306 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.SetMode
= HelDdSetMode
;
307 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.WaitForVerticalBlank
= HelDdWaitForVerticalBlank
;
309 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.dwFlags
= DDHAL_CB32_CANCREATESURFACE
|
310 DDHAL_CB32_CREATESURFACE
|
311 DDHAL_CB32_CREATEPALETTE
|
312 DDHAL_CB32_DESTROYDRIVER
|
313 DDHAL_CB32_FLIPTOGDISURFACE
|
314 DDHAL_CB32_GETSCANLINE
|
315 DDHAL_CB32_SETCOLORKEY
|
316 DDHAL_CB32_SETEXCLUSIVEMODE
|
318 DDHAL_CB32_WAITFORVERTICALBLANK
;
320 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDD
.dwSize
= sizeof(This
->lpLcl
->lpDDCB
->HELDD
);
322 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.AddAttachedSurface
= HelDdSurfAddAttachedSurface
;
323 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.Blt
= HelDdSurfBlt
;
324 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.DestroySurface
= HelDdSurfDestroySurface
;
325 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.Flip
= HelDdSurfFlip
;
326 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.GetBltStatus
= HelDdSurfGetBltStatus
;
327 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.GetFlipStatus
= HelDdSurfGetFlipStatus
;
328 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.Lock
= HelDdSurfLock
;
329 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.reserved4
= HelDdSurfreserved4
;
330 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.SetClipList
= HelDdSurfSetClipList
;
331 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.SetColorKey
= HelDdSurfSetColorKey
;
332 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.SetOverlayPosition
= HelDdSurfSetOverlayPosition
;
333 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.SetPalette
= HelDdSurfSetPalette
;
334 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.Unlock
= HelDdSurfUnlock
;
335 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.UpdateOverlay
= HelDdSurfUpdateOverlay
;
336 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.dwFlags
= DDHAL_SURFCB32_ADDATTACHEDSURFACE
|
338 DDHAL_SURFCB32_DESTROYSURFACE
|
339 DDHAL_SURFCB32_FLIP
|
340 DDHAL_SURFCB32_GETBLTSTATUS
|
341 DDHAL_SURFCB32_GETFLIPSTATUS
|
342 DDHAL_SURFCB32_LOCK
|
343 DDHAL_SURFCB32_RESERVED4
|
344 DDHAL_SURFCB32_SETCLIPLIST
|
345 DDHAL_SURFCB32_SETCOLORKEY
|
346 DDHAL_SURFCB32_SETOVERLAYPOSITION
|
347 DDHAL_SURFCB32_SETPALETTE
|
348 DDHAL_SURFCB32_UNLOCK
|
349 DDHAL_SURFCB32_UPDATEOVERLAY
;
351 This
->lpLcl
->lpGbl
->lpDDCBtmp
->HELDDSurface
.dwSize
= sizeof(This
->lpLcl
->lpDDCB
->HELDDSurface
);
354 This->lpLcl->lpDDCB->HELDDPalette.DestroyPalette = HelDdPalDestroyPalette;
355 This->lpLcl->lpDDCB->HELDDPalette.SetEntries = HelDdPalSetEntries;
356 This->lpLcl->lpDDCB->HELDDPalette.dwSize = sizeof(This->lpLcl->lpDDCB->HELDDPalette);
360 This->lpLcl->lpDDCB->HELDDExeBuf.CanCreateExecuteBuffer = HelDdExeCanCreateExecuteBuffer;
361 This->lpLcl->lpDDCB->HELDDExeBuf.CreateExecuteBuffer = HelDdExeCreateExecuteBuffer;
362 This->lpLcl->lpDDCB->HELDDExeBuf.DestroyExecuteBuffer = HelDdExeDestroyExecuteBuffer;
363 This->lpLcl->lpDDCB->HELDDExeBuf.LockExecuteBuffer = HelDdExeLockExecuteBuffer;
364 This->lpLcl->lpDDCB->HELDDExeBuf.UnlockExecuteBuffer = HelDdExeUnlockExecuteBuffer;
372 StartDirectDrawHal(LPDIRECTDRAW iface
, BOOL reenable
)
374 LPDWORD mpFourCC
= NULL
;
376 BOOL newmode
= FALSE
;
377 LPDDSURFACEDESC mpTextures
;
378 D3DHAL_CALLBACKS mD3dCallbacks
;
379 D3DHAL_GLOBALDRIVERDATA mD3dDriverData
;
380 DDHAL_DDEXEBUFCALLBACKS mD3dBufferCallbacks
;
381 LPDDRAWI_DIRECTDRAW_INT This
= (LPDDRAWI_DIRECTDRAW_INT
)iface
;
382 DDHAL_GETDRIVERINFODATA DdGetDriverInfo
= { 0 };
386 RtlZeroMemory(&mHALInfo
, sizeof(DDHALINFO
));
387 RtlZeroMemory(&mD3dCallbacks
, sizeof(D3DHAL_CALLBACKS
));
388 RtlZeroMemory(&mD3dDriverData
, sizeof(D3DHAL_GLOBALDRIVERDATA
));
389 RtlZeroMemory(&mD3dBufferCallbacks
, sizeof(DDHAL_DDEXEBUFCALLBACKS
));
391 if (reenable
== FALSE
)
393 if (ddgbl
.lpDDCBtmp
== NULL
)
395 DxHeapMemAlloc(ddgbl
.lpDDCBtmp
, sizeof(DDHAL_CALLBACKS
));
396 if ( ddgbl
.lpDDCBtmp
== NULL
)
404 RtlZeroMemory(ddgbl
.lpDDCBtmp
,sizeof(DDHAL_CALLBACKS
));
408 * Startup DX HAL step one of three
410 if (!DdCreateDirectDrawObject(This
->lpLcl
->lpGbl
, (HDC
)This
->lpLcl
->hDC
))
412 DxHeapMemFree(ddgbl
.lpDDCBtmp
);
416 /* Some card disable the dx after it have been created so
417 * we are force reanble it
419 if (!DdReenableDirectDrawObject(This
->lpLcl
->lpGbl
, &newmode
))
421 DxHeapMemFree(ddgbl
.lpDDCBtmp
);
425 if (!DdQueryDirectDrawObject(This
->lpLcl
->lpGbl
,
427 &ddgbl
.lpDDCBtmp
->HALDD
,
428 &ddgbl
.lpDDCBtmp
->HALDDSurface
,
429 &ddgbl
.lpDDCBtmp
->HALDDPalette
,
432 &mD3dBufferCallbacks
,
437 DxHeapMemFree(This
->lpLcl
->lpGbl
->lpModeInfo
);
438 DxHeapMemFree(ddgbl
.lpDDCBtmp
);
439 // FIXME Close DX fristcall and second call
443 DX_STUB_str("Trying alloc FourCCC \n");
446 if (This
->lpLcl
->lpGbl
->lpdwFourCC
!= NULL
)
448 DxHeapMemFree(This
->lpLcl
->lpGbl
->lpdwFourCC
);
451 if (mHALInfo
.ddCaps
.dwNumFourCCCodes
> 0 )
454 DxHeapMemAlloc(mpFourCC
, sizeof(DWORD
) * (mHALInfo
.ddCaps
.dwNumFourCCCodes
+ 2));
456 if (mpFourCC
== NULL
)
458 DxHeapMemFree(ddgbl
.lpDDCBtmp
);
459 // FIXME Close DX fristcall and second call
464 DX_STUB_str("End Trying alloc FourCCC\n");
470 /* Alloc mpTextures */
472 DX_STUB_str("1 Here\n");
474 if (This
->lpLcl
->lpGbl
->texture
!= NULL
)
476 DxHeapMemFree(This
->lpLcl
->lpGbl
->texture
;
480 if (mD3dDriverData
.dwNumTextureFormats
> 0)
482 mpTextures
= (DDSURFACEDESC
*) DxHeapMemAlloc(sizeof(DDSURFACEDESC
) * mD3dDriverData
.dwNumTextureFormats
);
483 if (mpTextures
== NULL
)
485 DxHeapMemFree(mpFourCC
);
486 DxHeapMemFree(ddgbl
.lpDDCBtmp
);
487 // FIXME Close DX fristcall and second call
491 DX_STUB_str("2 Here\n");
498 /* Get all basic data from the driver */
499 if (!DdQueryDirectDrawObject(
502 &ddgbl
.lpDDCBtmp
->HALDD
,
503 &ddgbl
.lpDDCBtmp
->HALDDSurface
,
504 &ddgbl
.lpDDCBtmp
->HALDDPalette
,
507 &ddgbl
.lpDDCBtmp
->HALDDExeBuf
,
508 (DDSURFACEDESC
*)mpTextures
,
512 DxHeapMemFree(mpFourCC
);
513 DxHeapMemFree(mpTextures
);
514 DxHeapMemFree(ddgbl
.lpDDCBtmp
);
515 // FIXME Close DX fristcall and second call
519 memcpy(&ddgbl
.vmiData
, &mHALInfo
.vmiData
,sizeof(VIDMEMINFO
));
522 memcpy(&ddgbl
.ddCaps
, &mHALInfo
.ddCaps
,sizeof(DDCORECAPS
));
524 This
->lpLcl
->lpGbl
->dwNumFourCC
= mHALInfo
.ddCaps
.dwNumFourCCCodes
;
525 This
->lpLcl
->lpGbl
->lpdwFourCC
= mpFourCC
;
526 This
->lpLcl
->lpGbl
->dwMonitorFrequency
= mHALInfo
.dwMonitorFrequency
;
527 This
->lpLcl
->lpGbl
->dwModeIndex
= mHALInfo
.dwModeIndex
;
528 This
->lpLcl
->lpGbl
->dwNumModes
= mHALInfo
.dwNumModes
;
529 This
->lpLcl
->lpGbl
->lpModeInfo
= mHALInfo
.lpModeInfo
;
531 DX_STUB_str("Here\n");
533 /* FIXME convert mpTextures to DDHALMODEINFO */
534 // DxHeapMemFree( mpTextures);
536 /* FIXME D3D setup mD3dCallbacks and mD3dDriverData */
541 if (mHALInfo
.dwFlags
& DDHALINFO_GETDRIVERINFOSET
)
543 DdGetDriverInfo
.dwSize
= sizeof (DDHAL_GETDRIVERINFODATA
);
544 DdGetDriverInfo
.guidInfo
= GUID_MiscellaneousCallbacks
;
545 DdGetDriverInfo
.lpvData
= (PVOID
)&ddgbl
.lpDDCBtmp
->HALDDMiscellaneous
;
546 DdGetDriverInfo
.dwExpectedSize
= sizeof (DDHAL_DDMISCELLANEOUSCALLBACKS
);
548 if(mHALInfo
.GetDriverInfo (&DdGetDriverInfo
) == DDHAL_DRIVER_NOTHANDLED
|| DdGetDriverInfo
.ddRVal
!= DD_OK
)
550 DxHeapMemFree(mpFourCC
);
551 DxHeapMemFree(mpTextures
);
552 DxHeapMemFree(ddgbl
.lpDDCBtmp
);
553 // FIXME Close DX fristcall and second call
557 RtlZeroMemory(&DdGetDriverInfo
, sizeof(DDHAL_GETDRIVERINFODATA
));
558 DdGetDriverInfo
.dwSize
= sizeof (DDHAL_GETDRIVERINFODATA
);
559 DdGetDriverInfo
.guidInfo
= GUID_Miscellaneous2Callbacks
;
562 DdGetDriverInfo.lpvData = (PVOID)&ddgbl.lpDDCBtmp->HALDDMiscellaneous;
563 DdGetDriverInfo.dwExpectedSize = sizeof (DDHAL_DDMISCELLANEOUS2CALLBACKS);
565 if(mHALInfo.GetDriverInfo (&DdGetDriverInfo) == DDHAL_DRIVER_NOTHANDLED || DdGetDriverInfo.ddRVal != DD_OK)
567 DxHeapMemFree(mpFourCC);
568 DxHeapMemFree(mpTextures);
569 DxHeapMemFree(ddgbl.lpDDCBtmp);
570 // FIXME Close DX fristcall and second call
573 DD_MISCELLANEOUS2CALLBACKS
577 PDD_ALPHABLT AlphaBlt; // unsuse acoding msdn and always set to NULL
578 PDD_CREATESURFACEEX CreateSurfaceEx;
579 PDD_GETDRIVERSTATE GetDriverState;
580 PDD_DESTROYDDLOCAL DestroyDDLocal;
582 DDHAL_MISC2CB32_CREATESURFACEEX
583 DDHAL_MISC2CB32_GETDRIVERSTATE
584 DDHAL_MISC2CB32_DESTROYDDLOCAL