Author: greatlrd
Date: Sat Apr 8 19:03:35 2006
New Revision: 21518
URL:
http://svn.reactos.ru/svn/reactos?rev=21518&view=rev
Log:
DirectDraw_EnumDisplayModes
base on wine implenetins taking wine code and rewrite some part. it is not complete but it
does the work.
DirectDraw_SetDisplayMode
remove the freq flag we ignore it for now. for EnumDisplayModes report modes that are
being support for the graphic card. but the monitor does not support it
Modified:
trunk/reactos/dll/directx/ddraw/ddraw.rbuild
trunk/reactos/dll/directx/ddraw/main/ddraw_main.c
trunk/reactos/dll/directx/ddraw/main/surface_main.c
trunk/reactos/dll/directx/ddraw/rosdraw.h
trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c
Modified: trunk/reactos/dll/directx/ddraw/ddraw.rbuild
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/ddraw.rbu…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/ddraw.rbuild (original)
+++ trunk/reactos/dll/directx/ddraw/ddraw.rbuild Sat Apr 8 19:03:35 2006
@@ -12,6 +12,7 @@
<library>d3d8thk</library>
<library>dxguid</library>
<library>ole32</library>
+ <library>user32</library>
<file>ddraw.rc</file>
<file>main.c</file>
Modified: trunk/reactos/dll/directx/ddraw/main/ddraw_main.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/main/ddra…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main/ddraw_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main/ddraw_main.c Sat Apr 8 19:03:35 2006
@@ -10,6 +10,26 @@
#include "rosdraw.h"
+static const DDPIXELFORMAT pixelformats[] =
+{
+ /* 8bpp paletted */
+ { sizeof(DDPIXELFORMAT), DDPF_RGB|DDPF_PALETTEINDEXED8, 0, { 8 } },
+ /* 15bpp 5/5/5 */
+ { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, { 16 }, { 0x7C00 }, { 0x3E0 },
+ { 0x1F } },
+ /* 16bpp 5/6/5 */
+ { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, { 16 }, { 0xF800 }, { 0x7E0 },
+ { 0x1F } },
+ /* 24bpp 8/8/8 */
+ { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, { 24 }, { 0xFF0000 },
+ { 0x00FF00 }, { 0x0000FF } },
+ /* 32bpp 8/8/8 */
+ { sizeof(DDPIXELFORMAT), DDPF_RGB, 0, { 32 }, { 0xFF0000 },
+ { 0x00FF00 }, { 0x0000FF } }
+};
+
+
+
/*
* IMPLEMENT
* Status this api is finish and is 100% correct
@@ -18,6 +38,8 @@
WINAPI
Main_DirectDraw_Initialize (LPDIRECTDRAW7 iface, LPGUID lpGUID)
{
+ DX_WINDBG_trace();
+
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
if (iface==NULL)
@@ -60,6 +82,8 @@
WINAPI
Main_DirectDraw_AddRef (LPDIRECTDRAW7 iface)
{
+ DX_WINDBG_trace();
+
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
ULONG ref=0;
@@ -80,6 +104,8 @@
WINAPI
Main_DirectDraw_Release (LPDIRECTDRAW7 iface)
{
+ DX_WINDBG_trace();
+
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
ULONG ref=0;
@@ -118,6 +144,8 @@
// for now we always asume it is the active dirver that should be use.
// - allow more Flags
+ DX_WINDBG_trace();
+
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
// check the parameters
@@ -155,6 +183,8 @@
HRESULT WINAPI Main_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD
dwHeight,
DWORD dwBPP, DWORD
dwRefreshRate, DWORD dwFlags)
{
+ DX_WINDBG_trace();
+
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
BOOL dummy = TRUE;
DWORD ret;
@@ -171,13 +201,14 @@
/* Check use the Hal or Hel for SetMode */
if (This->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_SETMODE)
{
- ret = Hal_DirectDraw_SetDisplayMode(iface, dwWidth, dwHeight, dwBPP, dwRefreshRate,
dwFlags);
+ ret = Hal_DirectDraw_SetDisplayMode(iface, dwWidth, dwHeight, dwBPP, dwRefreshRate,
dwFlags);
+
}
else
{
ret = Hel_DirectDraw_SetDisplayMode(iface, dwWidth, dwHeight, dwBPP, dwRefreshRate,
dwFlags);
}
-
+
if (ret == DD_OK)
{
DdReenableDirectDrawObject(&This->mDDrawGlobal, &dummy);
@@ -200,6 +231,8 @@
REFIID id,
LPVOID *obj)
{
+ DX_WINDBG_trace();
+
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
if (IsEqualGUID(&IID_IDirectDraw7, id))
@@ -231,6 +264,8 @@
HRESULT WINAPI Main_DirectDraw_CreateSurface (LPDIRECTDRAW7 iface, LPDDSURFACEDESC2
pDDSD,
LPDIRECTDRAWSURFACE7 *ppSurf, IUnknown
*pUnkOuter)
{
+ DX_WINDBG_trace();
+
HRESULT ret;
DxSurf *surf;
@@ -298,6 +333,8 @@
HRESULT WINAPI Main_DirectDraw_CreateClipper(LPDIRECTDRAW7 iface, DWORD dwFlags,
LPDIRECTDRAWCLIPPER *ppClipper, IUnknown
*pUnkOuter)
{
+ DX_WINDBG_trace();
+
if (pUnkOuter!=NULL)
return DDERR_INVALIDPARAMS;
@@ -320,12 +357,16 @@
HRESULT WINAPI DirectDrawCreateClipper (DWORD dwFlags,
LPDIRECTDRAWCLIPPER* lplpDDClipper, LPUNKNOWN
pUnkOuter)
{
+ DX_WINDBG_trace();
+
return Main_DirectDraw_CreateClipper(NULL, dwFlags, lplpDDClipper, pUnkOuter);
}
HRESULT WINAPI Main_DirectDraw_CreatePalette(LPDIRECTDRAW7 iface, DWORD dwFlags,
LPPALETTEENTRY palent, LPDIRECTDRAWPALETTE* ppPalette, LPUNKNOWN
pUnkOuter)
{
+ DX_WINDBG_trace();
+
if (pUnkOuter!=NULL)
return DDERR_INVALIDPARAMS;
@@ -359,6 +400,8 @@
HRESULT WINAPI Main_DirectDraw_GetCaps(LPDIRECTDRAW7 iface, LPDDCAPS pDriverCaps,
LPDDCAPS pHELCaps)
{
+ DX_WINDBG_trace();
+
DDSCAPS2 ddscaps;
DWORD status = DD_FALSE;
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
@@ -389,7 +432,9 @@
}
HRESULT WINAPI Main_DirectDraw_GetDisplayMode(LPDIRECTDRAW7 iface, LPDDSURFACEDESC2
pDDSD)
-{
+{
+ DX_WINDBG_trace();
+
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
if (pDDSD == NULL)
@@ -428,6 +473,8 @@
HRESULT WINAPI Main_DirectDraw_WaitForVerticalBlank(LPDIRECTDRAW7 iface, DWORD dwFlags,
HANDLE h)
{
+ DX_WINDBG_trace();
+
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
if (This->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags &
DDHAL_CB32_WAITFORVERTICALBLANK)
@@ -441,6 +488,8 @@
HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2
ddscaps,
LPDWORD total, LPDWORD free)
{
+ DX_WINDBG_trace();
+
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
@@ -454,6 +503,8 @@
HRESULT WINAPI Main_DirectDraw_GetMonitorFrequency(LPDIRECTDRAW7 iface,LPDWORD freq)
{
+ DX_WINDBG_trace();
+
IDirectDrawImpl *This = (IDirectDrawImpl *)iface;
if (freq == NULL)
@@ -467,6 +518,8 @@
HRESULT WINAPI Main_DirectDraw_GetScanLine(LPDIRECTDRAW7 iface, LPDWORD lpdwScanLine)
{
+ DX_WINDBG_trace();
+
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
if (This->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags & DDHAL_CB32_GETSCANLINE)
@@ -479,6 +532,8 @@
HRESULT WINAPI Main_DirectDraw_RestoreDisplayMode(LPDIRECTDRAW7 iface)
{
+ DX_WINDBG_trace();
+
ChangeDisplaySettings(NULL, 0);
return DD_OK;
}
@@ -487,42 +542,150 @@
HRESULT WINAPI Main_DirectDraw_Compact(LPDIRECTDRAW7 iface)
{
+ DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_DuplicateSurface(LPDIRECTDRAW7 iface, LPDIRECTDRAWSURFACE7
src,
LPDIRECTDRAWSURFACE7* dst)
{
+ DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_EnumDisplayModes(LPDIRECTDRAW7 iface, DWORD dwFlags,
LPDDSURFACEDESC2 pDDSD, LPVOID context, LPDDENUMMODESCALLBACK2 callback)
{
- DX_STUB;
+ DX_WINDBG_trace();
+
+ IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
+ DDSURFACEDESC2 desc_callback;
+ DEVMODE DevMode;
+ int iMode=0;
+
+ if (pDDSD!=NULL)
+ {
+ // FIXME fill in pDDSD
+ }
+
+ RtlZeroMemory(&desc_callback, sizeof(DDSURFACEDESC2));
+ desc_callback.dwSize = sizeof(DDSURFACEDESC2);
+
+ desc_callback.dwFlags = DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT|DDSD_CAPS |
DDSD_PITCH;
+
+ if (dwFlags & DDEDM_REFRESHRATES)
+ {
+ desc_callback.dwFlags |= DDSD_REFRESHRATE;
+ desc_callback.dwRefreshRate = This->mDDrawGlobal.dwMonitorFrequency;
+ }
+
+
+ /// FIXME check if the mode are suppretd before sending it back
+
+ while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0))
+ {
+
+ if (pDDSD)
+ {
+ if ((pDDSD->dwFlags & DDSD_WIDTH) && (pDDSD->dwWidth !=
DevMode.dmPelsWidth))
+ continue;
+ if ((pDDSD->dwFlags & DDSD_HEIGHT) && (pDDSD->dwHeight !=
DevMode.dmPelsHeight))
+ continue;
+ if ((pDDSD->dwFlags & DDSD_PIXELFORMAT) &&
(pDDSD->ddpfPixelFormat.dwFlags & DDPF_RGB) &&
+ (pDDSD->ddpfPixelFormat.dwRGBBitCount != DevMode.dmBitsPerPel))
+ continue;
+ }
+
+
+ desc_callback.dwHeight = DevMode.dmPelsHeight;
+ desc_callback.dwWidth = DevMode.dmPelsWidth;
+
+ if (DevMode.dmFields & DM_DISPLAYFREQUENCY)
+ {
+ desc_callback.dwRefreshRate = DevMode.dmDisplayFrequency;
+ }
+
+ switch(DevMode.dmBitsPerPel)
+ {
+ case 8:
+
memcpy(&desc_callback.ddpfPixelFormat,&pixelformats[0],sizeof(DDPIXELFORMAT));
+ break;
+
+ case 15:
+
memcpy(&desc_callback.ddpfPixelFormat,&pixelformats[1],sizeof(DDPIXELFORMAT));
+ break;
+
+ case 16:
+
memcpy(&desc_callback.ddpfPixelFormat,&pixelformats[2],sizeof(DDPIXELFORMAT));
+ break;
+
+
+ case 24:
+
memcpy(&desc_callback.ddpfPixelFormat,&pixelformats[3],sizeof(DDPIXELFORMAT));
+ break;
+
+ case 32:
+
memcpy(&desc_callback.ddpfPixelFormat,&pixelformats[3],sizeof(DDPIXELFORMAT));
+ break;
+
+ default:
+ break;
+ }
+
+ if (desc_callback.ddpfPixelFormat.dwRGBBitCount==15)
+ {
+ desc_callback.lPitch = DevMode.dmPelsWidth + (8 - ( DevMode.dmPelsWidth %
8)) % 8;
+ }
+ else
+ {
+ desc_callback.lPitch = DevMode.dmPelsWidth *
(desc_callback.ddpfPixelFormat.dwRGBBitCount / 8);
+ desc_callback.lPitch = desc_callback.lPitch + (8 - (desc_callback.lPitch %
8)) % 8;
+ }
+
+ desc_callback.ddsCaps.dwCaps = 0;
+ if (desc_callback.ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED8)
+ {
+ desc_callback.ddsCaps.dwCaps |= DDSCAPS_PALETTE;
+ }
+
+
+ if (callback(&desc_callback, context) == DDENUMRET_CANCEL)
+ {
+
+ return DD_OK;
+ }
+
+ iMode++;
+ }
+
+ return DD_OK;
}
HRESULT WINAPI Main_DirectDraw_EnumSurfaces(LPDIRECTDRAW7 iface, DWORD dwFlags,
LPDDSURFACEDESC2 lpDDSD2, LPVOID context,
LPDDENUMSURFACESCALLBACK7 callback)
{
+ DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetFourCCCodes(LPDIRECTDRAW7 iface, LPDWORD pNumCodes,
LPDWORD pCodes)
{
+ DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetGDISurface(LPDIRECTDRAW7 iface,
LPDIRECTDRAWSURFACE7 *lplpGDIDDSSurface)
{
+ DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetVerticalBlankStatus(LPDIRECTDRAW7 iface, LPBOOL
status)
{
+ DX_WINDBG_trace();
DX_STUB;
}
@@ -531,33 +694,39 @@
HRESULT WINAPI Main_DirectDraw_GetSurfaceFromDC(LPDIRECTDRAW7 iface, HDC hdc,
LPDIRECTDRAWSURFACE7 *lpDDS)
{
+ DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_RestoreAllSurfaces(LPDIRECTDRAW7 iface)
{
+ DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_TestCooperativeLevel(LPDIRECTDRAW7 iface)
{
+ DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier(LPDIRECTDRAW7 iface,
LPDDDEVICEIDENTIFIER2 pDDDI, DWORD dwFlags)
{
+ DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_StartModeTest(LPDIRECTDRAW7 iface, LPSIZE pModes,
DWORD dwNumModes, DWORD dwFlags)
-{
+{
+ DX_WINDBG_trace();
DX_STUB;
}
HRESULT WINAPI Main_DirectDraw_EvaluateMode(LPDIRECTDRAW7 iface,DWORD a,DWORD* b)
-{
+{
+ DX_WINDBG_trace();
DX_STUB;
}
Modified: trunk/reactos/dll/directx/ddraw/main/surface_main.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/main/surf…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/main/surface_main.c (original)
+++ trunk/reactos/dll/directx/ddraw/main/surface_main.c Sat Apr 8 19:03:35 2006
@@ -14,11 +14,14 @@
HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAW
pDD, LPDDSURFACEDESC2 pDDSD2)
{
+ DX_WINDBG_trace();
return DDERR_ALREADYINITIALIZED;
}
ULONG WINAPI Main_DDrawSurface_AddRef(LPDIRECTDRAWSURFACE7 iface)
{
+ DX_WINDBG_trace();
+
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
return
InterlockedIncrement((PLONG)&This->owner->mDDrawGlobal.dsList->dwIntRefCnt);
@@ -26,6 +29,8 @@
ULONG WINAPI Main_DDrawSurface_Release(LPDIRECTDRAWSURFACE7 iface)
{
+ DX_WINDBG_trace();
+
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
ULONG ref =
InterlockedDecrement((PLONG)&This->owner->mDDrawGlobal.dsList->dwIntRefCnt);
@@ -41,12 +46,16 @@
Main_DDrawSurface_QueryInterface(LPDIRECTDRAWSURFACE7 iface, REFIID riid,
LPVOID* ppObj)
{
+ DX_WINDBG_trace();
+
return E_NOINTERFACE;
}
HRESULT WINAPI Main_DDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
LPDIRECTDRAWSURFACE7 src, LPRECT rsrc, DWORD dwFlags, LPDDBLTFX lpbltfx)
{
+ DX_WINDBG_trace();
+
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
@@ -62,6 +71,8 @@
HRESULT WINAPI Main_DDrawSurface_Lock (LPDIRECTDRAWSURFACE7 iface, LPRECT prect,
LPDDSURFACEDESC2 pDDSD, DWORD flags, HANDLE event)
{
+ DX_WINDBG_trace();
+
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
if (This->owner->mDDrawGlobal.lpDDCBtmp->HALDD.dwFlags &
DDHAL_CB32_CREATESURFACE)
@@ -74,6 +85,8 @@
HRESULT WINAPI Main_DDrawSurface_Unlock (LPDIRECTDRAWSURFACE7 iface, LPRECT pRect)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -81,6 +94,8 @@
Main_DDrawSurface_AddAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWSURFACE7 pAttach)
{
+ DX_WINDBG_trace();
+
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
@@ -100,6 +115,8 @@
Main_DDrawSurface_AddOverlayDirtyRect(LPDIRECTDRAWSURFACE7 iface,
LPRECT pRect)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -108,12 +125,16 @@
DWORD dsty, LPDIRECTDRAWSURFACE7 src,
LPRECT rsrc, DWORD trans)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_Restore(LPDIRECTDRAWSURFACE7 iface)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -123,12 +144,16 @@
LPDDBLTBATCH pBatch, DWORD dwCount,
DWORD dwFlags)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_ChangeUniquenessValue(LPDIRECTDRAWSURFACE7 iface)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -137,6 +162,8 @@
DWORD dwFlags,
LPDIRECTDRAWSURFACE7 pAttach)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -145,6 +172,8 @@
LPVOID context,
LPDDENUMSURFACESCALLBACK7 cb)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -153,6 +182,8 @@
DWORD dwFlags, LPVOID context,
LPDDENUMSURFACESCALLBACK7 cb)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -160,12 +191,16 @@
Main_DDrawSurface_Flip(LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWSURFACE7 override, DWORD dwFlags)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_FreePrivateData(LPDIRECTDRAWSURFACE7 iface, REFGUID tag)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -174,18 +209,24 @@
LPDDSCAPS2 pCaps,
LPDIRECTDRAWSURFACE7* ppSurface)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetBltStatus(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetCaps(LPDIRECTDRAWSURFACE7 iface, LPDDSCAPS2 pCaps)
{
+ DX_WINDBG_trace();
+
IDirectDrawSurfaceImpl* This;
if (iface == NULL)
@@ -210,6 +251,8 @@
Main_DDrawSurface_GetClipper(LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWCLIPPER* ppClipper)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -217,12 +260,16 @@
Main_DDrawSurface_GetColorKey(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags,
LPDDCOLORKEY pCKey)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetDC(LPDIRECTDRAWSURFACE7 iface, HDC *phDC)
{
+ DX_WINDBG_trace();
+
IDirectDrawSurfaceImpl* This;
if (iface == NULL)
@@ -258,17 +305,23 @@
HRESULT WINAPI
Main_DDrawSurface_GetDDInterface(LPDIRECTDRAWSURFACE7 iface, LPVOID* pDD)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetFlipStatus(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetLOD(LPDIRECTDRAWSURFACE7 iface, LPDWORD pdwMaxLOD)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -276,12 +329,16 @@
Main_DDrawSurface_GetOverlayPosition(LPDIRECTDRAWSURFACE7 iface,
LPLONG pX, LPLONG pY)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_GetPalette(LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWPALETTE* ppPalette)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -289,6 +346,8 @@
Main_DDrawSurface_GetPixelFormat(LPDIRECTDRAWSURFACE7 iface,
LPDDPIXELFORMAT pDDPixelFormat)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -296,6 +355,8 @@
Main_DDrawSurface_GetPriority(LPDIRECTDRAWSURFACE7 iface,
LPDWORD pdwPriority)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -304,6 +365,8 @@
REFGUID tag, LPVOID pBuffer,
LPDWORD pcbBufferSize)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -311,6 +374,8 @@
Main_DDrawSurface_GetSurfaceDesc(LPDIRECTDRAWSURFACE7 iface,
LPDDSURFACEDESC2 pDDSD)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -318,30 +383,40 @@
Main_DDrawSurface_GetUniquenessValue(LPDIRECTDRAWSURFACE7 iface,
LPDWORD pValue)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_IsLost(LPDIRECTDRAWSURFACE7 iface)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_PageLock(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_PageUnlock(LPDIRECTDRAWSURFACE7 iface, DWORD dwFlags)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_ReleaseDC(LPDIRECTDRAWSURFACE7 iface, HDC hDC)
{
+ DX_WINDBG_trace();
+
IDirectDrawSurfaceImpl* This;
if (iface == NULL)
@@ -372,6 +447,8 @@
Main_DDrawSurface_SetClipper (LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWCLIPPER pDDClipper)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -379,12 +456,16 @@
Main_DDrawSurface_SetColorKey (LPDIRECTDRAWSURFACE7 iface,
DWORD dwFlags, LPDDCOLORKEY pCKey)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI
Main_DDrawSurface_SetLOD (LPDIRECTDRAWSURFACE7 iface, DWORD dwMaxLOD)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -392,6 +473,8 @@
Main_DDrawSurface_SetOverlayPosition (LPDIRECTDRAWSURFACE7 iface,
LONG X, LONG Y)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -399,6 +482,8 @@
Main_DDrawSurface_SetPalette (LPDIRECTDRAWSURFACE7 iface,
LPDIRECTDRAWPALETTE pPalette)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -406,6 +491,8 @@
Main_DDrawSurface_SetPriority (LPDIRECTDRAWSURFACE7 iface,
DWORD dwPriority)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -414,6 +501,8 @@
REFGUID tag, LPVOID pData,
DWORD cbSize, DWORD dwFlags)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -424,6 +513,8 @@
LPRECT pDstRect, DWORD dwFlags,
LPDDOVERLAYFX pFX)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
@@ -432,12 +523,16 @@
Main_DDrawSurface_UpdateOverlayDisplay (LPDIRECTDRAWSURFACE7 iface,
DWORD dwFlags)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
HRESULT WINAPI Main_DDrawSurface_UpdateOverlayZOrder (LPDIRECTDRAWSURFACE7 iface,
DWORD dwFlags, LPDIRECTDRAWSURFACE7 pDDSRef)
{
+ DX_WINDBG_trace();
+
DX_STUB;
}
Modified: trunk/reactos/dll/directx/ddraw/rosdraw.h
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/rosdraw.h…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/rosdraw.h (original)
+++ trunk/reactos/dll/directx/ddraw/rosdraw.h Sat Apr 8 19:03:35 2006
@@ -192,4 +192,24 @@
firstcall = FALSE; \
}
+#define DX_WINDBG_trace() \
+ static BOOL firstcallx = TRUE; \
+ if (firstcallx) \
+ { \
+ char buffer[1024]; \
+ sprintf ( buffer, "Enter Function %s (%s:%d)\n",
__FUNCTION__,__FILE__,__LINE__ ); \
+ OutputDebugStringA(buffer); \
+ firstcallx = FALSE; \
+ }
+
+#define DX_WINDBG_trace_res(width,height,bpp) \
+ static BOOL firstcallxx = TRUE; \
+ if (firstcallxx) \
+ { \
+ char buffer[1024]; \
+ sprintf ( buffer, "Setmode have been req width=%d, height=%d
bpp=%d\n",width,height,bpp); \
+ OutputDebugStringA(buffer); \
+ firstcallxx = FALSE; \
+ }
+
#endif /* __DDRAW_PRIVATE */
Modified: trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/directx/ddraw/soft/ddra…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c (original)
+++ trunk/reactos/dll/directx/ddraw/soft/ddraw_hel.c Sat Apr 8 19:03:35 2006
@@ -72,8 +72,11 @@
mode.dmPelsWidth = dwWidth;
mode.dmPelsHeight = dwHeight;
mode.dmBitsPerPel = dwBPP;
- mode.dmDisplayFrequency = dwRefreshRate;
+
+ //mode.dmDisplayFrequency = dwRefreshRate;
mode.dmFields = 0;
+
+ DX_STUB_str("in hel");
if(dwWidth)
mode.dmFields |= DM_PELSWIDTH;
@@ -81,12 +84,14 @@
mode.dmFields |= DM_PELSHEIGHT;
if(dwBPP)
mode.dmFields |= DM_BITSPERPEL;
+ /*
if(dwRefreshRate)
mode.dmFields |= DM_DISPLAYFREQUENCY;
-
+ */
if (ChangeDisplaySettings(&mode, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL)
return DDERR_UNSUPPORTEDMODE;
+
// TODO: reactivate ddraw object, maximize window, set it in foreground
// and set excluive mode (if implemented by the driver)