diff --git a/dlls/ddraw/ddraw/hal.c b/dlls/ddraw/ddraw/hal.c index b577c94e5fa..b48f6594216 100644 --- a/dlls/ddraw/ddraw/hal.c +++ b/dlls/ddraw/ddraw/hal.c @@ -79,7 +79,7 @@ static BOOL WINAPI set_hal_info(LPDDHALINFO lpDDHalInfo, BOOL reset) 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 @@ HAL_DirectDraw_SetDisplayMode(LPDIRECTDRAW7 iface, DWORD dwWidth, 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