PATCH: GetFourCCCodes
Marcus Meissner
marcus at jet.franken.de
Thu Sep 13 12:45:20 CDT 2001
Hi,
Ciao, Marcus
Changelog:
return the FOURCC codes set by the HAL driver.
Index: ddraw/hal.c
===================================================================
RCS file: /home/wine/wine/dlls/ddraw/ddraw/hal.c,v
retrieving revision 1.3
diff -u -r1.3 hal.c
--- ddraw/hal.c 2001/09/11 00:32:32 1.3
+++ ddraw/hal.c 2001/09/13 16:32:33
@@ -79,7 +79,7 @@
dd_gbl.dwMonitorFrequency = lpDDHalInfo->dwMonitorFrequency;
dd_gbl.vmiData = lpDDHalInfo->vmiData;
dd_gbl.dwModeIndex = lpDDHalInfo->dwModeIndex;
- /* FIXME: dwNumFourCC */
+ dd_gbl.dwNumFourCC = lpDDHalInfo->ddCaps.dwNumFourCCCodes;
dd_gbl.lpdwFourCC = lpDDHalInfo->lpdwFourCC;
dd_gbl.dwNumModes = lpDDHalInfo->dwNumModes;
dd_gbl.lpModeInfo = lpDDHalInfo->lpModeInfo;
@@ -498,6 +498,35 @@
return hr;
}
+HRESULT WINAPI
+HAL_DirectDraw_GetFourCCCodes(LPDIRECTDRAW7 iface, LPDWORD pNumCodes,
+ LPDWORD pCodes)
+{
+ int i;
+ ICOM_THIS(IDirectDrawImpl,iface);
+ if (*pNumCodes)
+ *pNumCodes=dd_gbl.dwNumFourCC;
+ if (pCodes && dd_gbl.dwNumFourCC)
+ memcpy(pCodes,dd_gbl.lpdwFourCC,sizeof(pCodes[0])*dd_gbl.dwNumFourCC);
+ FIXME("(%p,%p,%p)\n",This,pNumCodes,pCodes);
+ if (dd_gbl.dwNumFourCC) {
+ if (pCodes && FIXME_ON(ddraw)) {
+ FIXME("returning: ");
+ for (i=0;i<dd_gbl.dwNumFourCC;i++) {
+ MESSAGE("%c%c%c%c,",
+ ((LPBYTE)(pCodes+i))[0],
+ ((LPBYTE)(pCodes+i))[1],
+ ((LPBYTE)(pCodes+i))[2],
+ ((LPBYTE)(pCodes+i))[3]
+ );
+ }
+ MESSAGE("\n");
+ }
+ }
+ return DD_OK;
+}
+
+
static ICOM_VTABLE(IDirectDraw7) HAL_DirectDraw_VTable =
{
Main_DirectDraw_QueryInterface,
@@ -513,7 +542,7 @@
Main_DirectDraw_FlipToGDISurface,
Main_DirectDraw_GetCaps,
Main_DirectDraw_GetDisplayMode,
- Main_DirectDraw_GetFourCCCodes,
+ HAL_DirectDraw_GetFourCCCodes,
Main_DirectDraw_GetGDISurface,
Main_DirectDraw_GetMonitorFrequency,
Main_DirectDraw_GetScanLine,
More information about the wine-patches
mailing list