ReactOS  0.4.14-dev-317-g96040ec
ddraw.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

HRESULT WINAPI Main_DirectDraw_QueryInterface (LPDDRAWI_DIRECTDRAW_INT This, REFIID id, LPVOID *obj)
 
ULONG WINAPI Main_DirectDraw_AddRef (LPDDRAWI_DIRECTDRAW_INT This)
 
ULONG WINAPI Main_DirectDraw_Release (LPDDRAWI_DIRECTDRAW_INT This)
 
HRESULT WINAPI Main_DirectDraw_Compact (LPDDRAWI_DIRECTDRAW_INT This)
 
HRESULT WINAPI Main_DirectDraw_CreateClipper (LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, LPDIRECTDRAWCLIPPER *ppClipper, IUnknown *pUnkOuter)
 
HRESULT WINAPI Main_DirectDraw_CreatePalette (LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, LPPALETTEENTRY palent, LPDIRECTDRAWPALETTE *ppPalette, LPUNKNOWN pUnkOuter)
 
HRESULT WINAPI Main_DirectDraw_CreateSurface (LPDDRAWI_DIRECTDRAW_INT This, LPDDSURFACEDESC pDDSD, LPDDRAWI_DDRAWSURFACE_INT *ppSurf, IUnknown *pUnkOuter)
 
HRESULT WINAPI Main_DirectDraw_CreateSurface4 (LPDDRAWI_DIRECTDRAW_INT This, LPDDSURFACEDESC2 pDDSD, LPDDRAWI_DDRAWSURFACE_INT *ppSurf, IUnknown *pUnkOuter)
 
HRESULT WINAPI Main_DirectDraw_DuplicateSurface (LPDDRAWI_DIRECTDRAW_INT This, LPDIRECTDRAWSURFACE7 src, LPDIRECTDRAWSURFACE7 *dst)
 
HRESULT WINAPI Main_DirectDraw_EnumDisplayModes (LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, LPDDSURFACEDESC pDDSD, LPVOID pContext, LPDDENUMMODESCALLBACK pCallback)
 
HRESULT WINAPI Main_DirectDraw_EnumDisplayModes4 (LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, LPDDSURFACEDESC2 pDDSD, LPVOID pContext, LPDDENUMMODESCALLBACK2 pCallback)
 
HRESULT WINAPI Main_DirectDraw_EnumSurfaces (LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, LPDDSURFACEDESC lpDDSD2, LPVOID context, LPDDENUMSURFACESCALLBACK callback)
 
HRESULT WINAPI Main_DirectDraw_EnumSurfaces4 (LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD2, LPVOID context, LPDDENUMSURFACESCALLBACK2 callback)
 
HRESULT WINAPI Main_DirectDraw_EnumSurfaces7 (LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD2, LPVOID context, LPDDENUMSURFACESCALLBACK7 callback)
 
HRESULT WINAPI Main_DirectDraw_FlipToGDISurface (LPDDRAWI_DIRECTDRAW_INT This)
 
HRESULT WINAPI Main_DirectDraw_GetCaps (LPDDRAWI_DIRECTDRAW_INT This, LPDDCAPS pDriverCaps, LPDDCAPS pHELCaps)
 
HRESULT WINAPI Main_DirectDraw_GetDisplayMode (LPDDRAWI_DIRECTDRAW_INT This, LPDDSURFACEDESC pDDSD)
 
HRESULT WINAPI Main_DirectDraw_GetDisplayMode4 (LPDDRAWI_DIRECTDRAW_INT This, LPDDSURFACEDESC2 pDDSD)
 
HRESULT WINAPI Main_DirectDraw_GetFourCCCodes (LPDDRAWI_DIRECTDRAW_INT This, LPDWORD lpNumCodes, LPDWORD lpCodes)
 
HRESULT WINAPI Main_DirectDraw_GetGDISurface (LPDDRAWI_DIRECTDRAW_INT This, LPDIRECTDRAWSURFACE7 *lplpGDIDDSSurface)
 
HRESULT WINAPI Main_DirectDraw_GetMonitorFrequency (LPDDRAWI_DIRECTDRAW_INT This, LPDWORD lpFreq)
 
HRESULT WINAPI Main_DirectDraw_GetScanLine (LPDDRAWI_DIRECTDRAW_INT This, LPDWORD lpdwScanLine)
 
HRESULT WINAPI Main_DirectDraw_GetVerticalBlankStatus (LPDDRAWI_DIRECTDRAW_INT This, LPBOOL lpbIsInVB)
 
HRESULT WINAPI Main_DirectDraw_Initialize (LPDDRAWI_DIRECTDRAW_INT This, LPGUID lpGUID)
 
HRESULT WINAPI Main_DirectDraw_RestoreDisplayMode (LPDDRAWI_DIRECTDRAW_INT This)
 
HRESULT WINAPI Main_DirectDraw_SetCooperativeLevel (LPDDRAWI_DIRECTDRAW_INT This, HWND hwnd, DWORD cooplevel)
 
HRESULT WINAPI Main_DirectDraw_SetDisplayMode (LPDDRAWI_DIRECTDRAW_INT This, DWORD dwWidth, DWORD dwHeight, DWORD dwBPP)
 
HRESULT WINAPI Main_DirectDraw_SetDisplayMode2 (LPDDRAWI_DIRECTDRAW_INT This, DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags)
 
HRESULT WINAPI Main_DirectDraw_WaitForVerticalBlank (LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags, HANDLE h)
 
HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem4 (LPDDRAWI_DIRECTDRAW_INT This, LPDDSCAPS2 ddscaps, LPDWORD dwTotal, LPDWORD dwFree)
 
HRESULT WINAPI Main_DirectDraw_GetSurfaceFromDC (LPDDRAWI_DIRECTDRAW_INT This, HDC hdc, LPDIRECTDRAWSURFACE7 *lpDDS)
 
HRESULT WINAPI Main_DirectDraw_RestoreAllSurfaces (LPDDRAWI_DIRECTDRAW_INT This)
 
HRESULT WINAPI Main_DirectDraw_TestCooperativeLevel (LPDDRAWI_DIRECTDRAW_INT This)
 
HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier7 (LPDDRAWI_DIRECTDRAW_INT This, LPDDDEVICEIDENTIFIER2 pDDDI, DWORD dwFlags)
 
HRESULT WINAPI Main_DirectDraw_StartModeTest (LPDDRAWI_DIRECTDRAW_INT This, LPSIZE pModes, DWORD dwNumModes, DWORD dwFlags)
 
HRESULT WINAPI Main_DirectDraw_EvaluateMode (LPDDRAWI_DIRECTDRAW_INT This, DWORD a, DWORD *b)
 
DWORD CALLBACK HelDdSurfAddAttachedSurface (LPDDHAL_ADDATTACHEDSURFACEDATA lpDestroySurface)
 
DWORD CALLBACK HelDdSurfBlt (LPDDHAL_BLTDATA lpBltData)
 
DWORD CALLBACK HelDdSurfDestroySurface (LPDDHAL_DESTROYSURFACEDATA lpDestroySurfaceData)
 
DWORD CALLBACK HelDdSurfFlip (LPDDHAL_FLIPDATA lpFlipData)
 
DWORD CALLBACK HelDdSurfGetBltStatus (LPDDHAL_GETBLTSTATUSDATA lpGetBltStatusData)
 
DWORD CALLBACK HelDdSurfGetFlipStatus (LPDDHAL_GETFLIPSTATUSDATA lpGetFlipStatusData)
 
DWORD CALLBACK HelDdSurfLock (LPDDHAL_LOCKDATA lpLockData)
 
DWORD CALLBACK HelDdSurfreserved4 (DWORD *lpPtr)
 
DWORD CALLBACK HelDdSurfSetClipList (LPDDHAL_SETCLIPLISTDATA lpSetClipListData)
 
DWORD CALLBACK HelDdSurfSetColorKey (LPDDHAL_SETCOLORKEYDATA lpSetColorKeyData)
 
DWORD CALLBACK HelDdSurfSetOverlayPosition (LPDDHAL_SETOVERLAYPOSITIONDATA lpSetOverlayPositionData)
 
DWORD CALLBACK HelDdSurfSetPalette (LPDDHAL_SETPALETTEDATA lpSetPaletteData)
 
DWORD CALLBACK HelDdSurfUnlock (LPDDHAL_UNLOCKDATA lpUnLockData)
 
DWORD CALLBACK HelDdSurfUpdateOverlay (LPDDHAL_UPDATEOVERLAYDATA lpUpDateOverLayData)
 

Function Documentation

◆ HelDdSurfAddAttachedSurface()

DWORD CALLBACK HelDdSurfAddAttachedSurface ( LPDDHAL_ADDATTACHEDSURFACEDATA  lpDestroySurface)

Definition at line 12 of file callbacks_surf_hel.c.

13 {
14  DX_STUB;
15 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSurfBlt()

DWORD CALLBACK HelDdSurfBlt ( LPDDHAL_BLTDATA  lpBltData)

Definition at line 17 of file callbacks_surf_hel.c.

18 {
20 
21  if (lpBltData->dwFlags & DDBLT_COLORFILL)
22  {
23  HBRUSH hbr = CreateSolidBrush(lpBltData->bltFX.dwFillColor );
24  FillRect( (HDC)lpBltData->lpDDDestSurface->lpSurfMore->lpDD_lcl->hDC,
25  (CONST RECT *)&lpBltData->rDest,
26  hbr);
27  DeleteObject(hbr);
28  lpBltData->ddRVal = DD_OK;
29  }
30  else if (lpBltData->dwFlags & DDBLT_ROP)
31  {
32  BitBlt( (HDC)lpBltData->lpDDDestSurface->lpSurfMore->lpDD_lcl->hDC,
33  lpBltData->rDest.top,
34  lpBltData->rDest.left,
35  lpBltData->rDest.right,
36  lpBltData->rDest.bottom,
37  (HDC)lpBltData->lpDDSrcSurface->lpSurfMore->lpDD_lcl->hDC,
38  lpBltData->rSrc.top,
39  lpBltData->rSrc.right,
40  lpBltData->bltFX.dwROP);
41  lpBltData->ddRVal = DD_OK;
42  }
43  return DDHAL_DRIVER_HANDLED;
44 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
DWORD dwFillColor
Definition: ddraw.h:1310
RECTL rDest
Definition: ddrawi.h:848
LPDDRAWI_DDRAWSURFACE_LCL lpDDSrcSurface
Definition: ddrawi.h:849
static HDC
Definition: imagelist.c:92
long bottom
Definition: polytest.cpp:53
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
static VOID NTAPI BitBlt(IN ULONG Left, IN ULONG Top, IN ULONG Width, IN ULONG Height, IN PUCHAR Buffer, IN ULONG BitsPerPixel, IN ULONG Delta)
Definition: vga.c:410
long right
Definition: polytest.cpp:53
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#define DD_OK
Definition: ddraw.h:186
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
DWORD dwFlags
Definition: ddrawi.h:851
#define DDBLT_COLORFILL
Definition: ddraw.h:555
HRESULT ddRVal
Definition: ddrawi.h:854
LPDDRAWI_DDRAWSURFACE_LCL lpDDDestSurface
Definition: ddrawi.h:847
RECTL rSrc
Definition: ddrawi.h:850
DWORD dwROP
Definition: ddraw.h:1274
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
DDBLTFX bltFX
Definition: ddrawi.h:853
#define DDBLT_ROP
Definition: ddraw.h:562
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
#define CONST
Definition: pedump.c:81

Referenced by StartDirectDrawHel().

◆ HelDdSurfDestroySurface()

DWORD CALLBACK HelDdSurfDestroySurface ( LPDDHAL_DESTROYSURFACEDATA  lpDestroySurfaceData)

Definition at line 46 of file callbacks_surf_hel.c.

47 {
48  DX_STUB;
49 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSurfFlip()

DWORD CALLBACK HelDdSurfFlip ( LPDDHAL_FLIPDATA  lpFlipData)

Definition at line 51 of file callbacks_surf_hel.c.

52 {
53  DX_STUB;
54 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSurfGetBltStatus()

DWORD CALLBACK HelDdSurfGetBltStatus ( LPDDHAL_GETBLTSTATUSDATA  lpGetBltStatusData)

Definition at line 56 of file callbacks_surf_hel.c.

57 {
58  DX_STUB;
59 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSurfGetFlipStatus()

DWORD CALLBACK HelDdSurfGetFlipStatus ( LPDDHAL_GETFLIPSTATUSDATA  lpGetFlipStatusData)

Definition at line 61 of file callbacks_surf_hel.c.

62 {
63  DX_STUB;
64 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSurfLock()

DWORD CALLBACK HelDdSurfLock ( LPDDHAL_LOCKDATA  lpLockData)

Definition at line 66 of file callbacks_surf_hel.c.

67 {
68 
69  HDC hDC;
70  HBITMAP hImage = NULL;
71 
72  LONG cbBuffer = 0;
74 
75  HDC hMemDC = NULL;
76  HBITMAP hDCBmp = NULL;
77  BITMAP bm = {0};
78 
80 
81  /* ToDo tell ddraw internal this surface is locked */
82  /* ToDo add support for dwFlags */
83 
84 
85  /* Get our hdc for the active window */
86  hDC = GetDC((HWND)lpLockData->lpDDSurface->lpSurfMore->lpDD_lcl->hFocusWnd);
87 
88  if (hDC != NULL)
89  {
90  /* Create a memory bitmap to store a copy of current hdc surface */
91 
92  if (!lpLockData->bHasRect)
93  {
94  hImage = CreateCompatibleBitmap (hDC, lpLockData->lpDDSurface->lpGbl->wWidth, lpLockData->lpDDSurface->lpGbl->wHeight);
95  }
96  else
97  {
98  hImage = CreateCompatibleBitmap (hDC, lpLockData->rArea.right, lpLockData->rArea.bottom);
99  }
100 
101  /* Create a memory hdc so we can draw on our current memory bitmap */
102  hMemDC = CreateCompatibleDC(hDC);
103 
104  if (hMemDC != NULL)
105  {
106  /* Select our memory bitmap to our memory hdc */
107  hDCBmp = (HBITMAP) SelectObject (hMemDC, hImage);
108 
109  /* Get our memory bitmap information */
110  GetObject(hImage, sizeof(BITMAP), &bm);
111 
112  if (!lpLockData->bHasRect)
113  {
114  BitBlt (hMemDC, 0, 0, bm.bmWidth, bm.bmHeight, hDC, 0, 0, SRCCOPY);
115  }
116  else
117  {
118  BitBlt (hMemDC, lpLockData->rArea.top, lpLockData->rArea.left, lpLockData->rArea.right, lpLockData->rArea.bottom, hDC, 0, 0, SRCCOPY);
119  }
120 
121  SelectObject (hMemDC, hDCBmp);
122 
123  /* Allocate memory buffer for the bitmap pixel data */
124  cbBuffer = bm.bmWidthBytes * bm.bmHeight ;
126 
127  if (pixels != NULL)
128  {
129  /* Get the bitmap bits */
130  GetBitmapBits(hImage,cbBuffer,pixels);
131 
132  /* Fixme HACK - check which member stores the HEL bitmap buffer */
133  lpLockData->lpDDSurface->lpSurfMore->lpDDRAWReserved2 = pixels;
134 
135  /* Setup return value */
136  lpLockData->ddRVal = DD_OK;
137  lpLockData->lpSurfData = pixels;
138  }
139  }
140  }
141 
142 
143  /* Free the pixels buffer if we fail */
144  if ( (pixels != NULL) &&
145  (lpLockData->ddRVal != DD_OK) )
146  {
148  }
149 
150  /* Cleanup after us */
151  if (hImage != NULL)
152  {
153  DeleteObject (hImage);
154  }
155 
156  if (hMemDC != NULL)
157  {
158  DeleteDC (hMemDC);
159  }
160 
161  return DDHAL_DRIVER_HANDLED;
162 }
HRESULT ddRVal
Definition: ddrawi.h:833
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
HDC WINAPI GetDC(_In_opt_ HWND)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:829
static HDC
Definition: imagelist.c:92
long bottom
Definition: polytest.cpp:53
RECTL rArea
Definition: ddrawi.h:831
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
static VOID NTAPI BitBlt(IN ULONG Left, IN ULONG Top, IN ULONG Width, IN ULONG Height, IN PUCHAR Buffer, IN ULONG BitsPerPixel, IN ULONG Delta)
Definition: vga.c:410
long right
Definition: polytest.cpp:53
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#define DD_OK
Definition: ddraw.h:186
DWORD bHasRect
Definition: ddrawi.h:830
long LONG
Definition: pedump.c:60
long top
Definition: polytest.cpp:53
smooth NULL
Definition: ftsmooth.c:416
long left
Definition: polytest.cpp:53
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG WINAPI GetBitmapBits(_In_ HBITMAP hbit, _In_ LONG cb, _Out_writes_bytes_(cb) LPVOID lpvBits)
#define GetObject
Definition: wingdi.h:4463
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI DeleteDC(_In_ HDC)
Definition: bl.h:1331
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
Definition: gl.h:1546
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
DWORD * PDWORD
Definition: pedump.c:68
uint32_t * LPDWORD
Definition: typedefs.h:57
static HBITMAP
Definition: button.c:44
#define HeapFree(x, y, z)
Definition: compat.h:394
#define SRCCOPY
Definition: wingdi.h:332
LPVOID lpSurfData
Definition: ddrawi.h:832

Referenced by StartDirectDrawHel().

◆ HelDdSurfreserved4()

DWORD CALLBACK HelDdSurfreserved4 ( DWORD lpPtr)

Definition at line 164 of file callbacks_surf_hel.c.

165 {
166  /* This api is not documented by MS, keep it stubbed */
167  DX_STUB;
168 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSurfSetClipList()

DWORD CALLBACK HelDdSurfSetClipList ( LPDDHAL_SETCLIPLISTDATA  lpSetClipListData)

Definition at line 170 of file callbacks_surf_hel.c.

171 {
172  DX_STUB;
173 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSurfSetColorKey()

DWORD CALLBACK HelDdSurfSetColorKey ( LPDDHAL_SETCOLORKEYDATA  lpSetColorKeyData)

Definition at line 175 of file callbacks_surf_hel.c.

176 {
177  DX_STUB;
178 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSurfSetOverlayPosition()

DWORD CALLBACK HelDdSurfSetOverlayPosition ( LPDDHAL_SETOVERLAYPOSITIONDATA  lpSetOverlayPositionData)

Definition at line 180 of file callbacks_surf_hel.c.

181 {
182  DX_STUB;
183 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSurfSetPalette()

DWORD CALLBACK HelDdSurfSetPalette ( LPDDHAL_SETPALETTEDATA  lpSetPaletteData)

Definition at line 185 of file callbacks_surf_hel.c.

186 {
187  DX_STUB;
188 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ HelDdSurfUnlock()

DWORD CALLBACK HelDdSurfUnlock ( LPDDHAL_UNLOCKDATA  lpUnLockData)

Definition at line 190 of file callbacks_surf_hel.c.

191 {
192  HDC hDC;
193  HBITMAP hImage = NULL;
194 
195  HDC hMemDC = NULL;
196  HBITMAP hDCBmp = NULL;
197  BITMAP bm = {0};
198 
199  DX_WINDBG_trace();
200 
201  /* Get our hdc for the active window */
202  hDC = GetDC((HWND)lpUnLockData->lpDDSurface->lpSurfMore->lpDD_lcl->hFocusWnd);
203 
204  if (hDC != NULL)
205  {
206  /* Create a memory bitmap to store a copy of current hdc surface */
207 
208  /* fixme the rcarea are not store in the struct yet so the data will look corrupted */
209  hImage = CreateCompatibleBitmap (hDC, lpUnLockData->lpDDSurface->lpGbl->wWidth, lpUnLockData->lpDDSurface->lpGbl->wHeight);
210 
211  /* Create a memory hdc so we can draw on our current memory bitmap */
212  hMemDC = CreateCompatibleDC(hDC);
213 
214  if (hMemDC != NULL)
215  {
216  /* Select our memory bitmap to our memory hdc */
217  hDCBmp = (HBITMAP) SelectObject (hMemDC, hImage);
218 
219  /* Get our memory bitmap information */
220  GetObject(hImage, sizeof(BITMAP), &bm);
221 
222  SetBitmapBits(hImage,bm.bmWidthBytes * bm.bmHeight, lpUnLockData->lpDDSurface->lpSurfMore->lpDDRAWReserved2);
223 
224  BitBlt (hDC, 0, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY);
225 
226  SelectObject (hMemDC, hDCBmp);
227 
228  /* Setup return value */
229  lpUnLockData->ddRVal = DD_OK;
230  }
231  }
232 
233  /* Cleanup after us */
234  if (hImage != NULL)
235  {
236  DeleteObject (hImage);
237  }
238 
239  if (hMemDC != NULL)
240  {
241  DeleteDC (hMemDC);
242  }
243 
244  if (lpUnLockData->lpDDSurface->lpSurfMore->lpDDRAWReserved2 != NULL)
245  {
246  HeapFree(GetProcessHeap(), 0, lpUnLockData->lpDDSurface->lpSurfMore->lpDDRAWReserved2 );
247  }
248 
249  return DDHAL_DRIVER_HANDLED;
250 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
HDC WINAPI GetDC(_In_opt_ HWND)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
static HDC
Definition: imagelist.c:92
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
LPDDRAWI_DDRAWSURFACE_LCL lpDDSurface
Definition: ddrawi.h:840
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
static VOID NTAPI BitBlt(IN ULONG Left, IN ULONG Top, IN ULONG Width, IN ULONG Height, IN PUCHAR Buffer, IN ULONG BitsPerPixel, IN ULONG Delta)
Definition: vga.c:410
#define DDHAL_DRIVER_HANDLED
Definition: ddrawi.h:321
#define DD_OK
Definition: ddraw.h:186
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
HRESULT ddRVal
Definition: ddrawi.h:841
#define GetObject
Definition: wingdi.h:4463
LONG WINAPI SetBitmapBits(_In_ HBITMAP hbm, _In_ DWORD cb, _In_reads_bytes_(cb) CONST VOID *pvBits)
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI DeleteDC(_In_ HDC)
Definition: bl.h:1331
static HBITMAP
Definition: button.c:44
#define HeapFree(x, y, z)
Definition: compat.h:394
#define SRCCOPY
Definition: wingdi.h:332

Referenced by StartDirectDrawHel().

◆ HelDdSurfUpdateOverlay()

DWORD CALLBACK HelDdSurfUpdateOverlay ( LPDDHAL_UPDATEOVERLAYDATA  lpUpDateOverLayData)

Definition at line 252 of file callbacks_surf_hel.c.

253 {
254  DX_STUB;
255 }
#define DX_STUB
Definition: rosdraw.h:224

Referenced by StartDirectDrawHel().

◆ Main_DirectDraw_AddRef()

ULONG WINAPI Main_DirectDraw_AddRef ( LPDDRAWI_DIRECTDRAW_INT  This)

Definition at line 145 of file ddraw_main.c.

146 {
147  ULONG retValue = 0;
148 
149  DX_WINDBG_trace();
150 
151  /* Lock the thread */
153 
154  _SEH2_TRY
155  {
156  /* Increment the internal ref counter */
157  This->dwIntRefCnt++;
158 
159  /* Increment the local internal ref counter */
160  This->lpLcl->dwLocalRefCnt++;
161 
162  if (This->lpLcl->lpGbl != NULL)
163  {
164  /* Increment the global internal ref counter */
165  This->lpLcl->lpGbl->dwRefCnt++;
166  }
167  }
169  {
170  }
171  _SEH2_END;
172 
173  _SEH2_TRY
174  {
175  retValue = This->dwIntRefCnt;
176  }
178  {
179  retValue = 0;
180  }
181  _SEH2_END;
182 
183  /* Release the thread lock */
185 
186  /* Return the local Ref counter */
187  return retValue;
188 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
_SEH2_TRY
Definition: create.c:4250
VOID WINAPI AcquireDDThreadLock()
Definition: main.c:412
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
VOID WINAPI ReleaseDDThreadLock()
Definition: main.c:421
_SEH2_END
Definition: create.c:4424
unsigned int ULONG
Definition: retypes.h:1
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6

Referenced by Create_DirectDraw(), Main_DirectDraw_CreatePalette(), Main_DirectDraw_CreateSurface4(), Main_DirectDraw_QueryInterface(), ThunkDirectDraw2_AddRef(), ThunkDirectDraw4_AddRef(), and ThunkDirectDraw_AddRef().

◆ Main_DirectDraw_Compact()

HRESULT WINAPI Main_DirectDraw_Compact ( LPDDRAWI_DIRECTDRAW_INT  This)

Definition at line 267 of file ddraw_main.c.

268 {
269  HRESULT retVal = DD_OK;
270 
271  DX_WINDBG_trace();
272 
273  /* Lock the thread */
275 
276  _SEH2_TRY
277  {
278  /* Check if Exclusive mode has been activated */
279  if (This->lpLcl->lpGbl->lpExclusiveOwner != This->lpLcl)
280  {
281  retVal = DDERR_NOEXCLUSIVEMODE;
282  }
283  }
285  {
286  }
287  _SEH2_END;
288 
289  /* Release the thread lock */
291 
292  return retVal;
293 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
_SEH2_TRY
Definition: create.c:4250
VOID WINAPI AcquireDDThreadLock()
Definition: main.c:412
#define DD_OK
Definition: ddraw.h:186
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
LONG HRESULT
Definition: typedefs.h:77
VOID WINAPI ReleaseDDThreadLock()
Definition: main.c:421
#define DDERR_NOEXCLUSIVEMODE
Definition: ddraw.h:93
_SEH2_END
Definition: create.c:4424
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6

Referenced by ThunkDirectDraw2_Compact(), ThunkDirectDraw4_Compact(), and ThunkDirectDraw_Compact().

◆ Main_DirectDraw_CreateClipper()

HRESULT WINAPI Main_DirectDraw_CreateClipper ( LPDDRAWI_DIRECTDRAW_INT  This,
DWORD  dwFlags,
LPDIRECTDRAWCLIPPER ppClipper,
IUnknown pUnkOuter 
)

Definition at line 17 of file ddraw_stubs.c.

21 {
23  DX_STUB;
24 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Referenced by DirectDrawCreateClipper(), ThunkDirectDraw2_CreateClipper(), ThunkDirectDraw4_CreateClipper(), and ThunkDirectDraw_CreateClipper().

◆ Main_DirectDraw_CreatePalette()

HRESULT WINAPI Main_DirectDraw_CreatePalette ( LPDDRAWI_DIRECTDRAW_INT  This,
DWORD  dwFlags,
LPPALETTEENTRY  palent,
LPDIRECTDRAWPALETTE ppPalette,
LPUNKNOWN  pUnkOuter 
)

Definition at line 545 of file ddraw_main.c.

547 {
548  HRESULT ret = DD_OK;
549  DX_WINDBG_trace();
550 
552  *ppPalette = NULL;
553 
554  _SEH2_TRY
555  {
556  ret = Internal_CreatePalette(This, dwFlags, palent, ppPalette, pUnkOuter);
557  }
559  {
561  }
562  _SEH2_END;
563 
564  //Versions 7 and 4 are addref'ed
565  if((This->lpVtbl == &DirectDraw7_Vtable || This->lpVtbl == &DirectDraw4_Vtable) && *ppPalette != NULL)
567 
569  return ret;
570 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
CRITICAL_SECTION ddcs
Definition: main.c:14
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_SEH2_TRY
Definition: create.c:4250
IDirectDraw4Vtbl DirectDraw4_Vtable
Definition: ddraw_thunk.c:890
#define DD_OK
Definition: ddraw.h:186
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
int ret
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
_SEH2_END
Definition: create.c:4424
ULONG WINAPI Main_DirectDraw_AddRef(LPDDRAWI_DIRECTDRAW_INT This)
Definition: ddraw_main.c:145
HRESULT Internal_CreatePalette(LPDDRAWI_DIRECTDRAW_INT pDDraw, DWORD dwFlags, LPPALETTEENTRY palent, LPDIRECTDRAWPALETTE *ppPalette, LPUNKNOWN pUnkOuter)
Definition: createpalette.c:33
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
IDirectDraw7Vtbl DirectDraw7_Vtable
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

Referenced by ThunkDirectDraw2_CreatePalette(), ThunkDirectDraw4_CreatePalette(), and ThunkDirectDraw_CreatePalette().

◆ Main_DirectDraw_CreateSurface()

HRESULT WINAPI Main_DirectDraw_CreateSurface ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDDSURFACEDESC  pDDSD,
LPDDRAWI_DDRAWSURFACE_INT ppSurf,
IUnknown pUnkOuter 
)

Definition at line 478 of file ddraw_main.c.

480 {
482  DDSURFACEDESC2 dd_desc_v2;
483 
484  DX_WINDBG_trace();
485 
487  *ppSurf = NULL;
488 
489  _SEH2_TRY
490  {
491  if (pDDSD->dwSize == sizeof(DDSURFACEDESC))
492  {
493  CopyDDSurfDescToDDSurfDesc2(&dd_desc_v2, (LPDDSURFACEDESC)pDDSD);
495  &dd_desc_v2,
496  ppSurf,
497  pUnkOuter);
498  }
499  else
500  {
502  }
503  }
505  {
507  }
508  _SEH2_END;
510  return ret;
511 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
CRITICAL_SECTION ddcs
Definition: main.c:14
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_SEH2_TRY
Definition: create.c:4250
HRESULT Internal_CreateSurface(LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD, LPDDRAWI_DDRAWSURFACE_INT *ppSurf, IUnknown *pUnkOuter)
Definition: createsurface.c:18
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define DDERR_GENERIC
Definition: ddraw.h:72
LONG HRESULT
Definition: typedefs.h:77
int ret
void CopyDDSurfDescToDDSurfDesc2(LPDDSURFACEDESC2 dst_pDesc, LPDDSURFACEDESC src_pDesc)
_SEH2_END
Definition: create.c:4424
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

Referenced by ThunkDirectDraw2_CreateSurface(), ThunkDirectDraw4_CreateSurface(), and ThunkDirectDraw_CreateSurface().

◆ Main_DirectDraw_CreateSurface4()

HRESULT WINAPI Main_DirectDraw_CreateSurface4 ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDDSURFACEDESC2  pDDSD,
LPDDRAWI_DDRAWSURFACE_INT ppSurf,
IUnknown pUnkOuter 
)

Definition at line 516 of file ddraw_main.c.

518 {
519  HRESULT ret = DD_OK;
520  DX_WINDBG_trace();
521 
523  *ppSurf = NULL;
524 
525  _SEH2_TRY
526  {
527  ret = Internal_CreateSurface(This, pDDSD, ppSurf, pUnkOuter);
528  }
530  {
532  }
533  _SEH2_END;
534 
535  if(*ppSurf != NULL)
537 
539  return ret;
540 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
CRITICAL_SECTION ddcs
Definition: main.c:14
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_SEH2_TRY
Definition: create.c:4250
HRESULT Internal_CreateSurface(LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD, LPDDRAWI_DDRAWSURFACE_INT *ppSurf, IUnknown *pUnkOuter)
Definition: createsurface.c:18
#define DD_OK
Definition: ddraw.h:186
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
int ret
_SEH2_END
Definition: create.c:4424
ULONG WINAPI Main_DirectDraw_AddRef(LPDDRAWI_DIRECTDRAW_INT This)
Definition: ddraw_main.c:145
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

◆ Main_DirectDraw_DuplicateSurface()

HRESULT WINAPI Main_DirectDraw_DuplicateSurface ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDIRECTDRAWSURFACE7  src,
LPDIRECTDRAWSURFACE7 dst 
)

Definition at line 26 of file ddraw_stubs.c.

28 {
30  DX_STUB;
31 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Referenced by ThunkDirectDraw2_DuplicateSurface(), ThunkDirectDraw4_DuplicateSurface(), and ThunkDirectDraw_DuplicateSurface().

◆ Main_DirectDraw_EnumDisplayModes()

HRESULT WINAPI Main_DirectDraw_EnumDisplayModes ( LPDDRAWI_DIRECTDRAW_INT  This,
DWORD  dwFlags,
LPDDSURFACEDESC  pDDSD,
LPVOID  pContext,
LPDDENUMMODESCALLBACK  pCallback 
)

Definition at line 14 of file ddraw_displaymode.c.

16 {
17  HRESULT ret = DD_OK;
18  INT iMode = 0;
19  DEVMODE DevMode;
20 
22 
23  ZeroMemory(&DevMode, sizeof(DEVMODE));
24 
25  _SEH2_TRY
26  {
27 
28  if (pDDSD != NULL)
29  {
30  if (pDDSD->dwSize != sizeof(DDSURFACEDESC))
31  {
33  }
34  }
35 
36  if (IsBadCodePtr((LPVOID)pCallback))
37  {
39  }
40  else if ( ret == DD_OK)
41  {
42 
43  DevMode.dmSize = sizeof(DEVMODE);
44 
45  while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) != FALSE)
46  {
47  DDSURFACEDESC SurfaceDesc;
48 
49  ZeroMemory(&SurfaceDesc, sizeof(DDSURFACEDESC));
50 
51  iMode++;
52 
53  SurfaceDesc.dwSize = sizeof (DDSURFACEDESC);
55  SurfaceDesc.dwHeight = DevMode.dmPelsHeight;
56  SurfaceDesc.dwWidth = DevMode.dmPelsWidth;
57  SurfaceDesc.lPitch = DevMode.dmPelsWidth * DevMode.dmBitsPerPel / 8;
58  SurfaceDesc.dwRefreshRate = DevMode.dmDisplayFrequency;
59 
60  SurfaceDesc.ddpfPixelFormat.dwSize = sizeof (DDPIXELFORMAT);
61  SurfaceDesc.ddpfPixelFormat.dwFlags = DDPF_RGB;
62  // FIXME: get these
63  /*
64  SurfaceDesc.ddpfPixelFormat.dwRBitMask =
65  SurfaceDesc.ddpfPixelFormat.dwGBitMask =
66  SurfaceDesc.ddpfPixelFormat.dwBBitMask =
67  SurfaceDesc.ddpfPixelFormat.dwRGBAlphaBitMask =
68  */
69  SurfaceDesc.ddpfPixelFormat.dwRGBBitCount = DevMode.dmBitsPerPel;
70 
71  // FIXME1: This->lpLcl->lpGbl->dwMonitorFrequency is not set !
72  if(dwFlags & DDEDM_REFRESHRATES && SurfaceDesc.dwRefreshRate != This->lpLcl->lpGbl->dwMonitorFrequency)
73  {
74  //continue; // FIXME2: what is SurfaceDesc.dwRefreshRate supposed to be set to ?
75  }
76 
77  // FIXME: Take case when DDEDM_STANDARDVGAMODES flag is not set in account
78 
79  if(pDDSD)
80  {
81  if (pDDSD->dwFlags & DDSD_HEIGHT && pDDSD->dwHeight != SurfaceDesc.dwHeight)
82  continue;
83 
84  if (pDDSD->dwFlags & DDSD_WIDTH && pDDSD->dwWidth != SurfaceDesc.dwWidth)
85  continue;
86 
87  if (pDDSD->dwFlags & DDSD_PITCH && pDDSD->lPitch != SurfaceDesc.lPitch)
88  continue;
89 
90  if (pDDSD->dwFlags & DDSD_REFRESHRATE && pDDSD->dwRefreshRate != SurfaceDesc.dwRefreshRate)
91  continue;
92 
93  if (pDDSD->dwFlags & DDSD_PIXELFORMAT && pDDSD->ddpfPixelFormat.dwRGBBitCount != SurfaceDesc.ddpfPixelFormat.dwRGBBitCount)
94  continue; // FIXME: test for the other members of ddpfPixelFormat as well
95  }
96 
97  if((*pCallback)(&SurfaceDesc, pContext) == DDENUMRET_CANCEL)
98  break;
99  }
100  }
101 
102  }
104  {
105  }
106  _SEH2_END;
107 
108  return ret;
109 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
_In_ ULONG iMode
Definition: winddi.h:3520
#define DDEDM_REFRESHRATES
Definition: ddraw.h:529
WORD dmSize
Definition: wingdi.h:1563
DWORD dmDisplayFrequency
Definition: wingdi.h:1597
#define DDENUMRET_CANCEL
Definition: ddraw.h:188
#define ZeroMemory
Definition: winbase.h:1642
DEVMODEA DEVMODE
Definition: wingdi.h:4413
int32_t INT
Definition: typedefs.h:56
struct _DDPIXELFORMAT DDPIXELFORMAT
_SEH2_TRY
Definition: create.c:4250
void DDSURFACEDESC
Definition: amvideo.idl:24
BOOL NTAPI IsBadCodePtr(FARPROC lpfn)
Definition: except.c:874
#define DD_OK
Definition: ddraw.h:186
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define DDSD_HEIGHT
Definition: ddraw.h:209
#define DDPF_RGB
Definition: ddraw.h:507
LONG HRESULT
Definition: typedefs.h:77
DWORD dmPelsHeight
Definition: wingdi.h:1592
int ret
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define DDSD_WIDTH
Definition: ddraw.h:210
#define DDSD_PIXELFORMAT
Definition: ddraw.h:216
DWORD dmBitsPerPel
Definition: wingdi.h:1590
#define DDSD_REFRESHRATE
Definition: ddraw.h:222
_SEH2_END
Definition: create.c:4424
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
#define DDSD_PITCH
Definition: ddraw.h:211
DWORD dmPelsWidth
Definition: wingdi.h:1591

Referenced by ThunkDirectDraw2_EnumDisplayModes(), ThunkDirectDraw4_EnumDisplayModes(), and ThunkDirectDraw_EnumDisplayModes().

◆ Main_DirectDraw_EnumDisplayModes4()

HRESULT WINAPI Main_DirectDraw_EnumDisplayModes4 ( LPDDRAWI_DIRECTDRAW_INT  This,
DWORD  dwFlags,
LPDDSURFACEDESC2  pDDSD,
LPVOID  pContext,
LPDDENUMMODESCALLBACK2  pCallback 
)

Definition at line 112 of file ddraw_displaymode.c.

114 {
115  HRESULT ret = DD_OK;
116  INT iMode = 0;
117  DEVMODE DevMode;
118 
119  DX_WINDBG_trace();
120 
121  ZeroMemory(&DevMode, sizeof(DEVMODE));
122 
123  _SEH2_TRY
124  {
125 
126  if (pDDSD != NULL)
127  {
128  if (pDDSD->dwSize != sizeof(DDSURFACEDESC2))
129  {
131  }
132  }
133 
134  if (IsBadCodePtr((LPVOID)pCallback))
135  {
137  }
138  else if ( ret == DD_OK)
139  {
140 
141  DevMode.dmSize = sizeof(DEVMODE);
142 
143  while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) != FALSE)
144  {
145  DDSURFACEDESC2 SurfaceDesc;
146 
147  ZeroMemory(&SurfaceDesc, sizeof(DDSURFACEDESC2));
148 
149  iMode++;
150 
151  SurfaceDesc.dwSize = sizeof (DDSURFACEDESC2);
153  SurfaceDesc.dwHeight = DevMode.dmPelsHeight;
154  SurfaceDesc.dwWidth = DevMode.dmPelsWidth;
155  SurfaceDesc.lPitch = DevMode.dmPelsWidth * DevMode.dmBitsPerPel / 8;
156  SurfaceDesc.dwRefreshRate = DevMode.dmDisplayFrequency;
157 
158  SurfaceDesc.ddpfPixelFormat.dwSize = sizeof (DDPIXELFORMAT);
159  SurfaceDesc.ddpfPixelFormat.dwFlags = DDPF_RGB;
160  // FIXME: get these
161  /*
162  SurfaceDesc.ddpfPixelFormat.dwRBitMask =
163  SurfaceDesc.ddpfPixelFormat.dwGBitMask =
164  SurfaceDesc.ddpfPixelFormat.dwBBitMask =
165  SurfaceDesc.ddpfPixelFormat.dwRGBAlphaBitMask =
166  */
167  SurfaceDesc.ddpfPixelFormat.dwRGBBitCount = DevMode.dmBitsPerPel;
168 
169  // FIXME1: This->lpLcl->lpGbl->dwMonitorFrequency is not set !
170  if(dwFlags & DDEDM_REFRESHRATES && SurfaceDesc.dwRefreshRate != This->lpLcl->lpGbl->dwMonitorFrequency)
171  {
172  //continue; // FIXME2: what is SurfaceDesc.dwRefreshRate supposed to be set to ?
173  }
174 
175  // FIXME: Take case when DDEDM_STANDARDVGAMODES flag is not set in account
176 
177  if(pDDSD)
178  {
179  if (pDDSD->dwFlags & DDSD_HEIGHT && pDDSD->dwHeight != SurfaceDesc.dwHeight)
180  continue;
181 
182  if (pDDSD->dwFlags & DDSD_WIDTH && pDDSD->dwWidth != SurfaceDesc.dwWidth)
183  continue;
184 
185  if (pDDSD->dwFlags & DDSD_PITCH && pDDSD->lPitch != SurfaceDesc.lPitch)
186  continue;
187 
188  if (pDDSD->dwFlags & DDSD_REFRESHRATE && pDDSD->dwRefreshRate != SurfaceDesc.dwRefreshRate)
189  continue;
190 
192  continue; // FIXME: test for the other members of ddpfPixelFormat as well
193  }
194 
195  if((*pCallback)(&SurfaceDesc, pContext) == DDENUMRET_CANCEL)
196  break;
197  }
198  }
199 
200  }
202  {
203  }
204  _SEH2_END;
205 
206  return ret;
207 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
DWORD dwFlags
Definition: ddraw.h:1153
DWORD dwFlags
Definition: ddraw.h:1071
_In_ ULONG iMode
Definition: winddi.h:3520
#define DDEDM_REFRESHRATES
Definition: ddraw.h:529
WORD dmSize
Definition: wingdi.h:1563
DWORD dmDisplayFrequency
Definition: wingdi.h:1597
#define DDENUMRET_CANCEL
Definition: ddraw.h:188
#define ZeroMemory
Definition: winbase.h:1642
DEVMODEA DEVMODE
Definition: wingdi.h:4413
int32_t INT
Definition: typedefs.h:56
struct _DDPIXELFORMAT DDPIXELFORMAT
_SEH2_TRY
Definition: create.c:4250
BOOL NTAPI IsBadCodePtr(FARPROC lpfn)
Definition: except.c:874
DWORD dwWidth
Definition: ddraw.h:1155
#define DD_OK
Definition: ddraw.h:186
DDPIXELFORMAT ddpfPixelFormat
Definition: ddraw.h:1185
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define DDSD_HEIGHT
Definition: ddraw.h:209
DWORD dwRGBBitCount
Definition: ddraw.h:1075
#define DDPF_RGB
Definition: ddraw.h:507
DWORD dwRefreshRate
Definition: ddraw.h:1169
LONG HRESULT
Definition: typedefs.h:77
DWORD dmPelsHeight
Definition: wingdi.h:1592
int ret
DWORD dwSize
Definition: ddraw.h:1152
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
DWORD dwHeight
Definition: ddraw.h:1154
#define DDSD_WIDTH
Definition: ddraw.h:210
#define DDSD_PIXELFORMAT
Definition: ddraw.h:216
DWORD dmBitsPerPel
Definition: wingdi.h:1590
#define DDSD_REFRESHRATE
Definition: ddraw.h:222
_SEH2_END
Definition: create.c:4424
struct _DDSURFACEDESC2 DDSURFACEDESC2
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
DWORD dwSize
Definition: ddraw.h:1070
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
#define DDSD_PITCH
Definition: ddraw.h:211
DWORD dmPelsWidth
Definition: wingdi.h:1591

◆ Main_DirectDraw_EnumSurfaces()

HRESULT WINAPI Main_DirectDraw_EnumSurfaces ( LPDDRAWI_DIRECTDRAW_INT  This,
DWORD  dwFlags,
LPDDSURFACEDESC  lpDDSD2,
LPVOID  context,
LPDDENUMSURFACESCALLBACK  callback 
)

Definition at line 34 of file ddraw_stubs.c.

37 {
39  DX_STUB;
40 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Referenced by ThunkDirectDraw2_EnumSurfaces(), ThunkDirectDraw4_EnumSurfaces(), and ThunkDirectDraw_EnumSurfaces().

◆ Main_DirectDraw_EnumSurfaces4()

HRESULT WINAPI Main_DirectDraw_EnumSurfaces4 ( LPDDRAWI_DIRECTDRAW_INT  This,
DWORD  dwFlags,
LPDDSURFACEDESC2  lpDDSD2,
LPVOID  context,
LPDDENUMSURFACESCALLBACK2  callback 
)

Definition at line 43 of file ddraw_stubs.c.

46 {
48  DX_STUB;
49 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

◆ Main_DirectDraw_EnumSurfaces7()

HRESULT WINAPI Main_DirectDraw_EnumSurfaces7 ( LPDDRAWI_DIRECTDRAW_INT  This,
DWORD  dwFlags,
LPDDSURFACEDESC2  lpDDSD2,
LPVOID  context,
LPDDENUMSURFACESCALLBACK7  callback 
)

Definition at line 52 of file ddraw_stubs.c.

55 {
57  DX_STUB;
58 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

◆ Main_DirectDraw_EvaluateMode()

HRESULT WINAPI Main_DirectDraw_EvaluateMode ( LPDDRAWI_DIRECTDRAW_INT  This,
DWORD  a,
DWORD b 
)

Definition at line 131 of file ddraw_stubs.c.

132 {
133  DX_WINDBG_trace();
134  DX_STUB;
135 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

◆ Main_DirectDraw_FlipToGDISurface()

HRESULT WINAPI Main_DirectDraw_FlipToGDISurface ( LPDDRAWI_DIRECTDRAW_INT  This)

Definition at line 64 of file ddraw_stubs.c.

65 {
67  DX_STUB;
68 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Referenced by ThunkDirectDraw2_FlipToGDISurface(), ThunkDirectDraw4_FlipToGDISurface(), and ThunkDirectDraw_FlipToGDISurface().

◆ Main_DirectDraw_GetAvailableVidMem4()

HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem4 ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDDSCAPS2  ddscaps,
LPDWORD  dwTotal,
LPDWORD  dwFree 
)

Definition at line 318 of file ddraw_main.c.

320 {
321  HRESULT retVal = DD_OK;
323 
324  DX_WINDBG_trace();
325 
326  _SEH2_TRY
327  {
328  // There is no HEL implementation of this api
329  if (!(This->lpLcl->lpDDCB->HALDDMiscellaneous.dwFlags & DDHAL_MISCCB32_GETAVAILDRIVERMEMORY) ||
330  (This->lpLcl->lpGbl->dwFlags & DDRAWI_NOHARDWARE) )
331  {
332  retVal = DDERR_NODIRECTDRAWHW;
333  }
334  else
335  {
336  if ((!dwTotal && !dwFree) || !ddscaps)
337  {
338  retVal = DDERR_INVALIDPARAMS;
339  _SEH2_LEAVE;
340  }
341 
345  {
346  retVal = DDERR_INVALIDPARAMS;
347  _SEH2_LEAVE;
348  }
349 
350 
351  /* ddscaps->dwCaps2 & 0x01
352  this flag is outdate and are
353  set to 0 in ms dxsdk the name of
354  this flag is DDSCAPS2_HARDWAREDEINTERLACE
355  */
356 
357  if ( ddscaps->dwCaps2 & 0x01)
358  {
359  retVal = DDERR_INVALIDCAPS;
360  _SEH2_LEAVE;
361  }
362 
366  DDSCAPS3_DMAP))
367  {
368  retVal = DDERR_INVALIDCAPS;
369  _SEH2_LEAVE;
370  }
371 
372  if ( ddscaps->dwCaps4)
373  {
374  retVal = DDERR_INVALIDCAPS;
375  _SEH2_LEAVE;
376  }
377 
378  ZeroMemory(&memdata, sizeof(DDHAL_GETAVAILDRIVERMEMORYDATA));
379  memdata.lpDD = This->lpLcl->lpGbl;
380  memdata.ddRVal = DDERR_INVALIDPARAMS;
381 
382  memdata.ddsCapsEx.dwCaps2 = ddscaps->dwCaps2;
383  memdata.ddsCapsEx.dwCaps3 = ddscaps->dwCaps3;
384 
385  This->lpLcl->lpGbl->hDD = This->lpLcl->hDD;
386 
387  if (This->lpLcl->lpDDCB->HALDDMiscellaneous.GetAvailDriverMemory(&memdata) == DDHAL_DRIVER_NOTHANDLED)
388  {
389  retVal = DDERR_NODIRECTDRAWHW;
390 
391  if (dwTotal)
392  *dwTotal = 0;
393 
394  if (dwFree)
395  *dwFree = 0;
396  }
397  else
398  {
399  if (dwTotal)
400  *dwTotal = memdata.dwTotal;
401 
402  if (dwFree)
403  *dwFree = memdata.dwFree;
404 
405  retVal = memdata.ddRVal;
406  }
407  }
408  }
410  {
411  }
412  _SEH2_END;
413 
414  return retVal;
415 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DDHAL_MISCCB32_GETAVAILDRIVERMEMORY
Definition: ddrawi.h:688
#define DDERR_NODIRECTDRAWHW
Definition: ddraw.h:137
#define DDSCAPS3_MULTISAMPLE_QUALITY_MASK
Definition: ddraw.h:321
#define DDSCAPS3_AUTOGENMIPMAP
Definition: ddraw.h:326
#define DDSCAPS3_DMAP
Definition: ddraw.h:327
#define DDSCAPS_WRITEONLY
Definition: ddraw.h:266
DWORD dwCaps2
Definition: ddraw.h:733
#define DDSCAPS_PALETTE
Definition: ddraw.h:257
#define DDHAL_DRIVER_NOTHANDLED
Definition: ddrawi.h:320
DWORD dwCaps3
Definition: ddraw.h:1060
#define ZeroMemory
Definition: winbase.h:1642
DWORD dwCaps4
Definition: ddraw.h:737
#define DDSCAPS_OWNDC
Definition: ddraw.h:268
_SEH2_TRY
Definition: create.c:4250
#define DDSCAPS_FLIP
Definition: ddraw.h:253
#define DDSCAPS_VISIBLE
Definition: ddraw.h:265
#define DDSCAPS3_MULTISAMPLE_MASK
Definition: ddraw.h:320
#define DD_OK
Definition: ddraw.h:186
#define DDSCAPS_SYSTEMMEMORY
Definition: ddraw.h:261
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define DDRAWI_NOHARDWARE
Definition: ddrawi.h:1301
DWORD dwCaps
Definition: ddraw.h:732
#define DDSCAPS_FRONTBUFFER
Definition: ddraw.h:254
#define DDSCAPS3_RESERVED1
Definition: ddraw.h:323
#define DDSCAPS_COMPLEX
Definition: ddraw.h:252
LONG HRESULT
Definition: typedefs.h:77
DWORD dwCaps2
Definition: ddraw.h:1059
LPDDRAWI_DIRECTDRAW_GBL lpDD
Definition: ddrawi.h:1754
DWORD dwCaps3
Definition: ddraw.h:734
_SEH2_END
Definition: create.c:4424
#define DDSCAPS_BACKBUFFER
Definition: ddraw.h:251
#define DDSCAPS3_RESERVED2
Definition: ddraw.h:324
#define DDERR_INVALIDCAPS
Definition: ddraw.h:75
#define DDSCAPS3_LIGHTWEIGHTMIPMAP
Definition: ddraw.h:325
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define _SEH2_LEAVE
Definition: filesup.c:20
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

Referenced by Main_DirectDraw_GetAvailableVidMem(), and Main_DirectDraw_GetCaps().

◆ Main_DirectDraw_GetCaps()

HRESULT WINAPI Main_DirectDraw_GetCaps ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDDCAPS  pDriverCaps,
LPDDCAPS  pHELCaps 
)

Definition at line 23 of file GetCaps.c.

25 {
27 
29 
31 
32  _SEH2_TRY
33  {
34  if ((!pDriverCaps) && (!pHELCaps))
35  {
36  retVal = DDERR_INVALIDPARAMS;
38  }
39 
40  /*
41  * DDCAPS_DX6 and DDCAPS_DX7 have same size so
42  * we do not need check both only one of them
43  */
44  if ( (pDriverCaps) &&
45  (pDriverCaps->dwSize != sizeof(DDCAPS_DX1) ) &&
46  (pDriverCaps->dwSize != sizeof(DDCAPS_DX3) ) &&
47  (pDriverCaps->dwSize != sizeof(DDCAPS_DX5) ) &&
48  (pDriverCaps->dwSize != sizeof(DDCAPS_DX7 )) )
49  {
50  retVal = DDERR_INVALIDPARAMS;
52  }
53 
54  /*
55  * DDCAPS_DX6 and DDCAPS_DX7 have same size so
56  * we do not need check both only one of them
57  */
58  if ( (pHELCaps) &&
59  (pHELCaps->dwSize != sizeof(DDCAPS_DX1) ) &&
60  (pHELCaps->dwSize != sizeof(DDCAPS_DX3) ) &&
61  (pHELCaps->dwSize != sizeof(DDCAPS_DX5) ) &&
62  (pHELCaps->dwSize != sizeof(DDCAPS_DX7 )) )
63  {
64  retVal = DDERR_INVALIDPARAMS;
66  }
67 
68  if (pDriverCaps)
69  {
70  /* Setup hardware caps */
71  DDSCAPS2 ddscaps = { 0 };
72  LPDDCORECAPS CoreCaps = (LPDDCORECAPS)&This->lpLcl->lpGbl->ddCaps;
73 
74  DWORD dwTotal = 0;
75  DWORD dwFree = 0;
76 
77  Main_DirectDraw_GetAvailableVidMem4(This, &ddscaps, &dwTotal, &dwFree);
78 
79  switch (pDriverCaps->dwSize)
80  {
81  case sizeof(DDCAPS_DX1):
82  {
83  LPDDCAPS_DX1 myCaps = (LPDDCAPS_DX1) pDriverCaps;
84 
85  if (CoreCaps->dwSize == sizeof(DDCORECAPS))
86  {
87  memcpy(myCaps, CoreCaps, sizeof(DDCAPS_DX1));
88  }
89 
90  myCaps->dwVidMemFree = dwFree;
91  myCaps->dwVidMemTotal = dwTotal;
92  myCaps->dwSize = sizeof(DDCAPS_DX1);
93 
94  retVal = DD_OK;
95  }
96  break;
97 
98  case sizeof(DDCAPS_DX3):
99  {
100  LPDDCAPS_DX3 myCaps = (LPDDCAPS_DX3) pDriverCaps;
101 
102  if (CoreCaps->dwSize == sizeof(DDCORECAPS))
103  {
104  memcpy(myCaps, CoreCaps, sizeof(DDCAPS_DX3));
105  }
106 
107  myCaps->dwVidMemFree = dwFree;
108  myCaps->dwVidMemTotal = dwTotal;
109  myCaps->dwSize = sizeof(DDCAPS_DX3);
110 
111  retVal = DD_OK;
112  }
113  break;
114 
115  case sizeof(DDCAPS_DX5):
116  {
117  LPDDCAPS_DX5 myCaps = (LPDDCAPS_DX5) pDriverCaps;
118 
119  /* FIXME This->lpLcl->lpGbl->lpddNLVCaps are not set in startup.c
120  if (This->lpLcl->lpGbl->lpddNLVCaps->dwSize == sizeof(DDNONLOCALVIDMEMCAPS))
121  {
122  memcpy(&myCaps->dwNLVBCaps, This->lpLcl->lpGbl->lpddNLVCaps, sizeof(DDNONLOCALVIDMEMCAPS));
123  }
124  */
125  memset(&myCaps->dwNLVBCaps,0,sizeof(DDNONLOCALVIDMEMCAPS));
126 
127  if (CoreCaps->dwSize == sizeof(DDCORECAPS))
128  {
129  memcpy(myCaps, CoreCaps, sizeof(DDCORECAPS));
130  }
131 
132  myCaps->dwVidMemFree = dwFree;
133  myCaps->dwVidMemTotal = dwTotal;
134  myCaps->dwSize = sizeof(DDCAPS_DX5);
135 
136  retVal = DD_OK;
137  }
138  break;
139 
140  /* DDCAPS_DX6 is same as DDCAPS_DX7 */
141  case sizeof(DDCAPS_DX7):
142  {
143  LPDDCAPS_DX7 myCaps = (LPDDCAPS_DX7) pDriverCaps;
144 
145  /* FIXME This->lpLcl->lpGbl->lpddNLVCaps are not set in startup.c
146  if (This->lpLcl->lpGbl->lpddNLVCaps->dwSize == sizeof(DDNONLOCALVIDMEMCAPS))
147  {
148  memcpy(&myCaps->dwNLVBCaps, This->lpLcl->lpGbl->lpddNLVCaps, sizeof(DDNONLOCALVIDMEMCAPS));
149  }
150  */
151  memset(&myCaps->dwNLVBCaps,0,sizeof(DDNONLOCALVIDMEMCAPS));
152 
153  if (CoreCaps->dwSize == sizeof(DDCORECAPS))
154  {
155  memcpy(myCaps, CoreCaps, sizeof(DDCORECAPS));
156  }
157 
158  myCaps->dwVidMemFree = dwFree;
159  myCaps->dwVidMemTotal = dwTotal;
160 
161  myCaps->ddsCaps.dwCaps = myCaps->ddsOldCaps.dwCaps;
162  myCaps->ddsCaps.dwCaps2 = 0;
163  myCaps->ddsCaps.dwCaps3 = 0;
164  myCaps->ddsCaps.dwCaps4 = 0;
165  myCaps->dwSize = sizeof(DDCAPS_DX7);
166 
167  retVal = DD_OK;
168 
169  }
170  break;
171 
172  default:
173  retVal = DDERR_INVALIDPARAMS;
174  break;
175  }
176  }
177 
178  if (pHELCaps)
179  {
180  /* Setup software caps */
181  LPDDCORECAPS CoreCaps = (LPDDCORECAPS)&This->lpLcl->lpGbl->ddHELCaps;
182 
183  DWORD dwTotal = 0;
184  DWORD dwFree = 0;
185 
186  switch (pHELCaps->dwSize)
187  {
188  case sizeof(DDCAPS_DX1):
189  {
190  LPDDCAPS_DX1 myCaps = (LPDDCAPS_DX1) pHELCaps;
191 
192  if (CoreCaps->dwSize == sizeof(DDCORECAPS))
193  {
194  memcpy(myCaps, CoreCaps, sizeof(DDCAPS_DX1));
195  }
196 
197  myCaps->dwVidMemFree = dwFree;
198  myCaps->dwVidMemTotal = dwTotal;
199  myCaps->dwSize = sizeof(DDCAPS_DX1);
200 
201  retVal = DD_OK;
202  }
203  break;
204 
205  case sizeof(DDCAPS_DX3):
206  {
207  LPDDCAPS_DX3 myCaps = (LPDDCAPS_DX3) pHELCaps;
208 
209  if (CoreCaps->dwSize == sizeof(DDCORECAPS))
210  {
211  memcpy(myCaps, CoreCaps, sizeof(DDCAPS_DX3));
212  }
213 
214  myCaps->dwVidMemFree = dwFree;
215  myCaps->dwVidMemTotal = dwTotal;
216  myCaps->dwSize = sizeof(DDCAPS_DX3);
217 
218  retVal = DD_OK;
219  }
220  break;
221 
222  case sizeof(DDCAPS_DX5):
223  {
224  LPDDCAPS_DX5 myCaps = (LPDDCAPS_DX5) pHELCaps;
225 
226  /* FIXME This->lpLcl->lpGbl->lpddNLVHELCaps are not set in startup.c
227  if (This->lpLcl->lpGbl->lpddNLVHELCaps->dwSize == sizeof(DDNONLOCALVIDMEMCAPS))
228  {
229  memcpy(&myCaps->dwNLVBCaps, This->lpLcl->lpGbl->lpddNLVHELCaps, sizeof(DDNONLOCALVIDMEMCAPS));
230  }
231  */
232  memset(&myCaps->dwNLVBCaps,0,sizeof(DDNONLOCALVIDMEMCAPS));
233 
234  if (CoreCaps->dwSize == sizeof(DDCORECAPS))
235  {
236  memcpy(myCaps, CoreCaps, sizeof(DDCORECAPS));
237  }
238 
239  myCaps->dwVidMemFree = dwFree;
240  myCaps->dwVidMemTotal = dwTotal;
241  myCaps->dwSize = sizeof(DDCAPS_DX5);
242 
243  retVal = DD_OK;
244  }
245  break;
246 
247  /* DDCAPS_DX6 is same as DDCAPS_DX7 */
248  case sizeof(DDCAPS_DX7):
249  {
250  LPDDCAPS_DX7 myCaps = (LPDDCAPS_DX7) pHELCaps;
251 
252  /* FIXME This->lpLcl->lpGbl->lpddNLVHELCaps are not set in startup.c
253  if (This->lpLcl->lpGbl->lpddNLVHELCaps->dwSize == sizeof(DDNONLOCALVIDMEMCAPS))
254  {
255  memcpy(&myCaps->dwNLVBCaps, This->lpLcl->lpGbl->lpddNLVHELCaps, sizeof(DDNONLOCALVIDMEMCAPS));
256  }
257  */
258  memset(&myCaps->dwNLVBCaps,0,sizeof(DDNONLOCALVIDMEMCAPS));
259 
260  if (CoreCaps->dwSize == sizeof(DDCORECAPS))
261  {
262  memcpy(myCaps, CoreCaps, sizeof(DDCORECAPS));
263  }
264 
265  myCaps->dwVidMemFree = dwFree;
266  myCaps->dwVidMemTotal = dwTotal;
267 
268  myCaps->ddsCaps.dwCaps = myCaps->ddsOldCaps.dwCaps;
269  myCaps->ddsCaps.dwCaps2 = 0;
270  myCaps->ddsCaps.dwCaps3 = 0;
271  myCaps->ddsCaps.dwCaps4 = 0;
272  myCaps->dwSize = sizeof(DDCAPS_DX7);
273 
274  retVal = DD_OK;
275 
276  }
277  break;
278 
279  default:
280  retVal = DDERR_INVALIDPARAMS;
281  break;
282  }
283  }
284 
285  }
287  {
288  retVal = DD_FALSE;
289  }
290  _SEH2_END;
291 
293  return retVal;
294 }
DWORD dwSize
Definition: ddrawi.h:251
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
CRITICAL_SECTION ddcs
Definition: main.c:14
DWORD dwVidMemTotal
Definition: ddraw.h:975
struct _DDCORECAPS * LPDDCORECAPS
DWORD dwCaps2
Definition: ddraw.h:733
DWORD dwCaps
Definition: ddraw.h:727
struct _DDCAPS_DX1 * LPDDCAPS_DX1
struct _DDCAPS_DX3 DDCAPS_DX3
DWORD dwVidMemFree
Definition: ddraw.h:855
DWORD dwCaps4
Definition: ddraw.h:737
DWORD dwNLVBCaps
Definition: ddraw.h:1011
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_SEH2_TRY
Definition: create.c:4250
struct _DDCAPS_DX5 DDCAPS_DX5
DDSCAPS2 ddsCaps
Definition: ddraw.h:1016
#define DD_OK
Definition: ddraw.h:186
HRESULT WINAPI Main_DirectDraw_GetAvailableVidMem4(LPDDRAWI_DIRECTDRAW_INT This, LPDDSCAPS2 ddscaps, LPDWORD dwTotal, LPDWORD dwFree)
Definition: ddraw_main.c:318
struct _DDCAPS_DX7 DDCAPS_DX7
DDSCAPS ddsOldCaps
Definition: ddraw.h:986
DWORD dwNLVBCaps
Definition: ddraw.h:890
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
DWORD dwCaps
Definition: ddraw.h:732
switch(r->id)
Definition: btrfs.c:2904
DWORD dwVidMemTotal
Definition: ddraw.h:799
struct _DDCAPS_DX3 * LPDDCAPS_DX3
DWORD dwSize
Definition: ddraw.h:784
struct _DDCAPS_DX5 * LPDDCAPS_DX5
DWORD dwSize
Definition: ddraw.h:960
LONG HRESULT
Definition: typedefs.h:77
DWORD dwVidMemFree
Definition: ddraw.h:760
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD dwCaps3
Definition: ddraw.h:734
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
DWORD dwVidMemTotal
Definition: ddraw.h:759
DWORD dwSize
Definition: ddraw.h:744
#define DD_FALSE
Definition: ddraw.h:187
_SEH2_END
Definition: create.c:4424
DWORD dwSize
Definition: ddraw.h:839
DWORD dwVidMemFree
Definition: ddraw.h:976
DWORD dwVidMemTotal
Definition: ddraw.h:854
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define _SEH2_LEAVE
Definition: filesup.c:20
#define memset(x, y, z)
Definition: compat.h:39
struct _DDCAPS_DX7 * LPDDCAPS_DX7
struct _DDCAPS_DX1 DDCAPS_DX1
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
DWORD dwVidMemFree
Definition: ddraw.h:800

Referenced by ThunkDirectDraw2_GetCaps(), ThunkDirectDraw4_GetCaps(), and ThunkDirectDraw_GetCaps().

◆ Main_DirectDraw_GetDeviceIdentifier7()

HRESULT WINAPI Main_DirectDraw_GetDeviceIdentifier7 ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDDDEVICEIDENTIFIER2  pDDDI,
DWORD  dwFlags 
)

Definition at line 58 of file GetDeviceIdentifier.c.

60 {
62 
63  BOOL found = FALSE;
64  DWORD iDevNum = 0;
65  DISPLAY_DEVICEA DisplayDeviceA;
66  HKEY hKey;
67  DWORD lpType = 0;
68  DWORD strSize = MAX_DDDEVICEID_STRING;
69  char *pdest;
70  char* pcCnvEnd;
71  long *lpdata;
72 
74 
76 
77  _SEH2_TRY
78  {
79  if ( (IsBadWritePtr( pDDDI, sizeof(DDDEVICEIDENTIFIER2) ) ) ||
81  {
82  retVal = DDERR_INVALIDPARAMS;
84  }
85 
86  /* now we can start getting the driver data */
87 
88  while (1)
89  {
90  ZeroMemory(&DisplayDeviceA,sizeof(DISPLAY_DEVICEA));
91 
92  DisplayDeviceA.cb = sizeof(DISPLAY_DEVICEA);
93 
94  if ( EnumDisplayDevicesA( NULL, iDevNum, &DisplayDeviceA, 0) == 0)
95  {
96  retVal = DDERR_INVALIDPARAMS;
97  break;
98  }
99 
100  if (_stricmp(DisplayDeviceA.DeviceName, This->lpLcl->lpGbl->cDriverName) != 0)
101  {
102  /* if we got another device like hardware mpeg decoder or video card or another drv */
103  found = TRUE;
104  }
105  else if (DisplayDeviceA.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE)
106  {
107  /* double check if it primary driver we just found */
108  if (!_stricmp( This->lpLcl->lpGbl->cDriverName, "DISPLAY"))
109  {
110  /* yeah we found it */
111  found = TRUE;
112  }
113  }
114 
115  if (found != FALSE)
116  {
117  /* we found our driver now we start setup it */
118  if (!_strnicmp(DisplayDeviceA.DeviceKey,"\\REGISTRY\\Machine\\",18))
119  {
120  if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, &DisplayDeviceA.DeviceKey[18], 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS )
121  {
122 
123  if (RegQueryValueExA(hKey, "InstalledDisplayDrivers",0, &lpType, (LPBYTE)pDDDI->szDriver, &strSize) != ERROR_SUCCESS)
124  {
126  }
127  else
128  {
129  strcat(pDDDI->szDriver,".dll");
130  }
131  RegCloseKey(hKey);
132  }
133 
134  strcpy( pDDDI->szDescription, DisplayDeviceA.DeviceString);
135  pDDDI->liDriverVersion.HighPart = 0;
136  pDDDI->liDriverVersion.LowPart = 0;
137 
138  pdest = strstr(DisplayDeviceA.DeviceID,"REV_");
139  pDDDI->dwRevision = strtol ( &pdest[4], &pcCnvEnd, 16);
140 
141  pdest = strstr(DisplayDeviceA.DeviceID,"SUBSYS_");
142  pDDDI->dwSubSysId = strtol ( &pdest[7], &pcCnvEnd, 16);
143 
144  pdest = strstr(DisplayDeviceA.DeviceID,"DEV_");
145  pDDDI->dwDeviceId = strtol ( &pdest[4], &pcCnvEnd, 16);
146 
147  pdest = strstr(DisplayDeviceA.DeviceID,"VEN_");
148  pDDDI->dwVendorId =strtol ( &pdest[4], &pcCnvEnd, 16);
149 
150  /* Count out the guidDeviceIdentifier */
151  memcpy(&pDDDI->guidDeviceIdentifier, &CLSID_DirectDraw,sizeof(GUID));
152 
153  pDDDI->guidDeviceIdentifier.Data1 ^= pDDDI->dwVendorId;
154 
155  lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data2;
156  *lpdata ^= pDDDI->dwDeviceId;
157 
158  lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data4;
159  *lpdata = (*lpdata ^ pDDDI->dwSubSysId) ^ pDDDI->liDriverVersion.LowPart;
160 
161  lpdata = (long *)&pDDDI->guidDeviceIdentifier.Data4[4];
162  *lpdata = (*lpdata ^ pDDDI->dwRevision) ^ pDDDI->liDriverVersion.HighPart;
163 
164  /* FIXME pDDDI->dwWHQLLevel
165  * we leave this with no informations, I do not known
166  * if program care for it, I mark this api done, and
167  * tested, no bugs was found in it
168  */
169  pDDDI->dwWHQLLevel = 0;
170  retVal = DD_OK;
171  }
172 
173  break;
174  }
175 
176  iDevNum++;
177  }
178 
179  }
181  {
182  retVal = DD_FALSE;
183  }
184  _SEH2_END;
185 
187  return retVal;
188 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
CRITICAL_SECTION ddcs
Definition: main.c:14
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4023
#define TRUE
Definition: types.h:120
#define MAX_DDDEVICEID_STRING
Definition: ddraw.h:201
BOOL NTAPI IsBadWritePtr(IN LPVOID lp, IN UINT_PTR ucb)
Definition: except.c:885
#define ERROR_SUCCESS
Definition: deptool.c:10
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
#define DDGDI_GETHOSTIDENTIFIER
Definition: ddraw.h:202
CHAR DeviceString[128]
Definition: wingdi.h:2806
char * strstr(char *String1, char *String2)
Definition: utclib.c:653
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
Definition: reg.c:3331
#define ZeroMemory
Definition: winbase.h:1642
CHAR DeviceName[32]
Definition: wingdi.h:2805
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define _stricmp
Definition: cat.c:22
_SEH2_TRY
Definition: create.c:4250
#define DD_OK
Definition: ddraw.h:186
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
_Check_return_ _CRTIMP int __cdecl _strnicmp(_In_reads_or_z_(_MaxCount) const char *_Str1, _In_reads_or_z_(_MaxCount) const char *_Str2, _In_ size_t _MaxCount)
CHAR DeviceKey[128]
Definition: wingdi.h:2809
BOOL WINAPI EnumDisplayDevicesA(LPCSTR lpDevice, DWORD iDevNum, PDISPLAY_DEVICEA lpDisplayDevice, DWORD dwFlags)
Definition: display.c:23
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
struct _DISPLAY_DEVICEA DISPLAY_DEVICEA
#define DISPLAY_DEVICE_PRIMARY_DEVICE
Definition: wingdi.h:1397
char szDescription[MAX_DDDEVICEID_STRING]
Definition: ddraw.h:1346
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define DD_FALSE
Definition: ddraw.h:187
char szDriver[MAX_DDDEVICEID_STRING]
Definition: ddraw.h:1345
_SEH2_END
Definition: create.c:4424
DWORD StateFlags
Definition: wingdi.h:2807
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
CHAR DeviceID[128]
Definition: wingdi.h:2808
_Check_return_ long __cdecl strtol(_In_z_ const char *_Str, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define _SEH2_LEAVE
Definition: filesup.c:20
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by Main_DirectDraw_GetDeviceIdentifier().

◆ Main_DirectDraw_GetDisplayMode()

HRESULT WINAPI Main_DirectDraw_GetDisplayMode ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDDSURFACEDESC  pDDSD 
)

Definition at line 366 of file ddraw_displaymode.c.

367 {
368  HRESULT retVal = DD_OK;
369  DX_WINDBG_trace();
370 
371  _SEH2_TRY
372  {
373  if(IsBadWritePtr(pDDSD,sizeof(LPDDSURFACEDESC)))
374  {
375  retVal = DDERR_INVALIDPARAMS;
376  }
377  else if (pDDSD->dwSize != sizeof(DDSURFACEDESC))
378  {
379  retVal = DDERR_INVALIDPARAMS;
380  }
381  else
382  {
383  // FIXME: More structure members might need to be filled
384 
386  pDDSD->dwHeight = This->lpLcl->lpGbl->vmiData.dwDisplayHeight;
387  pDDSD->dwWidth = This->lpLcl->lpGbl->vmiData.dwDisplayWidth;
388  pDDSD->ddpfPixelFormat = This->lpLcl->lpGbl->vmiData.ddpfDisplay;
389  pDDSD->dwRefreshRate = This->lpLcl->lpGbl->dwMonitorFrequency;
390  pDDSD->lPitch = This->lpLcl->lpGbl->vmiData.lDisplayPitch;
391  }
392  }
394  {
395  }
396  _SEH2_END;
397 
398  return retVal;
399 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
BOOL NTAPI IsBadWritePtr(IN LPVOID lp, IN UINT_PTR ucb)
Definition: except.c:885
_SEH2_TRY
Definition: create.c:4250
#define DD_OK
Definition: ddraw.h:186
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define DDSD_HEIGHT
Definition: ddraw.h:209
LONG HRESULT
Definition: typedefs.h:77
#define DDSD_WIDTH
Definition: ddraw.h:210
#define DDSD_PIXELFORMAT
Definition: ddraw.h:216
#define DDSD_REFRESHRATE
Definition: ddraw.h:222
_SEH2_END
Definition: create.c:4424
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
#define DDSD_PITCH
Definition: ddraw.h:211

Referenced by ThunkDirectDraw2_GetDisplayMode(), ThunkDirectDraw4_GetDisplayMode(), and ThunkDirectDraw_GetDisplayMode().

◆ Main_DirectDraw_GetDisplayMode4()

HRESULT WINAPI Main_DirectDraw_GetDisplayMode4 ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDDSURFACEDESC2  pDDSD 
)

Definition at line 402 of file ddraw_displaymode.c.

403 {
404  HRESULT retVal = DD_OK;
405  DX_WINDBG_trace();
406 
407  _SEH2_TRY
408  {
409  if(IsBadWritePtr(pDDSD,sizeof(LPDDSURFACEDESC2)))
410  {
411  retVal = DDERR_INVALIDPARAMS;
412  }
413  else if (pDDSD->dwSize != sizeof(DDSURFACEDESC2))
414  {
415  retVal = DDERR_INVALIDPARAMS;
416  }
417  else
418  {
419  // FIXME: More structure members might need to be filled
420 
422  pDDSD->dwHeight = This->lpLcl->lpGbl->vmiData.dwDisplayHeight;
423  pDDSD->dwWidth = This->lpLcl->lpGbl->vmiData.dwDisplayWidth;
424  pDDSD->ddpfPixelFormat = This->lpLcl->lpGbl->vmiData.ddpfDisplay;
425  pDDSD->dwRefreshRate = This->lpLcl->lpGbl->dwMonitorFrequency;
426  pDDSD->lPitch = This->lpLcl->lpGbl->vmiData.lDisplayPitch;
427  }
428  }
430  {
431  }
432  _SEH2_END;
433 
434  return retVal;
435 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
DWORD dwFlags
Definition: ddraw.h:1153
BOOL NTAPI IsBadWritePtr(IN LPVOID lp, IN UINT_PTR ucb)
Definition: except.c:885
_SEH2_TRY
Definition: create.c:4250
DWORD dwWidth
Definition: ddraw.h:1155
#define DD_OK
Definition: ddraw.h:186
DDPIXELFORMAT ddpfPixelFormat
Definition: ddraw.h:1185
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define DDSD_HEIGHT
Definition: ddraw.h:209
DWORD dwRefreshRate
Definition: ddraw.h:1169
LONG HRESULT
Definition: typedefs.h:77
DWORD dwSize
Definition: ddraw.h:1152
DWORD dwHeight
Definition: ddraw.h:1154
#define DDSD_WIDTH
Definition: ddraw.h:210
#define DDSD_PIXELFORMAT
Definition: ddraw.h:216
#define DDSD_REFRESHRATE
Definition: ddraw.h:222
_SEH2_END
Definition: create.c:4424
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
#define DDSD_PITCH
Definition: ddraw.h:211

◆ Main_DirectDraw_GetFourCCCodes()

HRESULT WINAPI Main_DirectDraw_GetFourCCCodes ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDWORD  lpNumCodes,
LPDWORD  lpCodes 
)

Definition at line 418 of file ddraw_main.c.

419 {
420  HRESULT retVal = DD_OK;
421 
422  DX_WINDBG_trace();
423 
424 
425  // EnterCriticalSection(&ddcs);
426 
427  _SEH2_TRY
428  {
429  if(IsBadWritePtr(lpNumCodes,sizeof(LPDWORD)))
430  {
431  retVal = DDERR_INVALIDPARAMS;
432  }
433  else
434  {
435  if(!(IsBadWritePtr(lpNumCodes,sizeof(LPDWORD))))
436  {
437  DWORD size;
438 
439  if (*lpNumCodes > This->lpLcl->lpGbl->dwNumFourCC)
440  {
441  *lpNumCodes = This->lpLcl->lpGbl->dwNumFourCC;
442  }
443 
444  size = *lpNumCodes * sizeof(DWORD);
445 
446  if(!IsBadWritePtr(lpCodes, size ))
447  {
448  memcpy(lpCodes, This->lpLcl->lpGbl->lpdwFourCC, size );
449  }
450  else
451  {
452  *lpNumCodes = This->lpLcl->lpGbl->dwNumFourCC;
453  }
454  }
455  }
456  }
458  {
459  }
460  _SEH2_END;
461 
462  //LeaveCriticalSection(&ddcs);
463  return retVal;
464 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
BOOL NTAPI IsBadWritePtr(IN LPVOID lp, IN UINT_PTR ucb)
Definition: except.c:885
#define DWORD
Definition: nt_native.h:44
_SEH2_TRY
Definition: create.c:4250
#define DD_OK
Definition: ddraw.h:186
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
GLsizeiptr size
Definition: glext.h:5919
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
_SEH2_END
Definition: create.c:4424
uint32_t * LPDWORD
Definition: typedefs.h:57
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

Referenced by ThunkDirectDraw2_GetFourCCCodes(), ThunkDirectDraw4_GetFourCCCodes(), and ThunkDirectDraw_GetFourCCCodes().

◆ Main_DirectDraw_GetGDISurface()

HRESULT WINAPI Main_DirectDraw_GetGDISurface ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDIRECTDRAWSURFACE7 lplpGDIDDSSurface 
)

Definition at line 72 of file ddraw_stubs.c.

74 {
76  DX_STUB;
77 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Referenced by ThunkDirectDraw2_GetGDISurface(), ThunkDirectDraw4_GetGDISurface(), and ThunkDirectDraw_GetGDISurface().

◆ Main_DirectDraw_GetMonitorFrequency()

HRESULT WINAPI Main_DirectDraw_GetMonitorFrequency ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDWORD  lpFreq 
)

Definition at line 333 of file ddraw_displaymode.c.

334 {
335  HRESULT retVal = DD_OK;
336  DX_WINDBG_trace();
337 
338  _SEH2_TRY
339  {
340  if(IsBadWritePtr(lpFreq,sizeof(LPDWORD)))
341  {
342  retVal = DDERR_INVALIDPARAMS;
343  }
344  else
345  {
346  if (This->lpLcl->lpGbl->dwMonitorFrequency)
347  {
348  *lpFreq = This->lpLcl->lpGbl->dwMonitorFrequency;
349  }
350  else
351  {
352  retVal = DDERR_UNSUPPORTED;
353  }
354  }
355  }
357  {
358  retVal = DD_FALSE;
359  }
360  _SEH2_END;
361 
362  return retVal;
363 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
BOOL NTAPI IsBadWritePtr(IN LPVOID lp, IN UINT_PTR ucb)
Definition: except.c:885
#define DDERR_UNSUPPORTED
Definition: ddraw.h:127
_SEH2_TRY
Definition: create.c:4250
#define DD_OK
Definition: ddraw.h:186
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
LONG HRESULT
Definition: typedefs.h:77
#define DD_FALSE
Definition: ddraw.h:187
_SEH2_END
Definition: create.c:4424
uint32_t * LPDWORD
Definition: typedefs.h:57
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79

Referenced by ThunkDirectDraw2_GetMonitorFrequency(), ThunkDirectDraw4_GetMonitorFrequency(), and ThunkDirectDraw_GetMonitorFrequency().

◆ Main_DirectDraw_GetScanLine()

HRESULT WINAPI Main_DirectDraw_GetScanLine ( LPDDRAWI_DIRECTDRAW_INT  This,
LPDWORD  lpdwScanLine 
)

Definition at line 80 of file ddraw_stubs.c.

81 {
83  DX_STUB;
84 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Referenced by ThunkDirectDraw2_GetScanLine(), ThunkDirectDraw4_GetScanLine(), and ThunkDirectDraw_GetScanLine().

◆ Main_DirectDraw_GetSurfaceFromDC()

HRESULT WINAPI Main_DirectDraw_GetSurfaceFromDC ( LPDDRAWI_DIRECTDRAW_INT  This,
HDC  hdc,
LPDIRECTDRAWSURFACE7 lpDDS 
)

Definition at line 104 of file ddraw_stubs.c.

106 {
107  DX_WINDBG_trace();
108  DX_STUB;
109 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Referenced by ThunkDirectDraw4_GetSurfaceFromDC().

◆ Main_DirectDraw_GetVerticalBlankStatus()

HRESULT WINAPI Main_DirectDraw_GetVerticalBlankStatus ( LPDDRAWI_DIRECTDRAW_INT  This,
LPBOOL  lpbIsInVB 
)

Definition at line 87 of file ddraw_stubs.c.

88 {
90  DX_STUB;
91 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Referenced by ThunkDirectDraw2_GetVerticalBlankStatus(), ThunkDirectDraw4_GetVerticalBlankStatus(), and ThunkDirectDraw_GetVerticalBlankStatus().

◆ Main_DirectDraw_Initialize()

HRESULT WINAPI Main_DirectDraw_Initialize ( LPDDRAWI_DIRECTDRAW_INT  This,
LPGUID  lpGUID 
)

Definition at line 247 of file ddraw_main.c.

248 {
250 }
#define DDERR_ALREADYINITIALIZED
Definition: ddraw.h:67

◆ Main_DirectDraw_QueryInterface()

HRESULT WINAPI Main_DirectDraw_QueryInterface ( LPDDRAWI_DIRECTDRAW_INT  This,
REFIID  id,
LPVOID obj 
)

Definition at line 37 of file ddraw_main.c.

40 {
41  HRESULT retVal = DD_OK;
42 
44 
45  _SEH2_TRY
46  {
47  /* FIXME
48  the D3D object can be obtained from here
49  Direct3D7
50  */
51  if (IsEqualGUID(&IID_IDirectDraw7, id))
52  {
53  if (This->lpVtbl != &DirectDraw7_Vtable)
54  {
56  if (!This)
57  {
58  retVal = DDERR_OUTOFVIDEOMEMORY;
60  }
61  }
62 
63  This->lpVtbl = &DirectDraw7_Vtable;
64  *obj = This;
66  }
67  else if (IsEqualGUID(&IID_IDirectDraw4, id))
68  {
69  if (This->lpVtbl != &DirectDraw4_Vtable)
70  {
72  if (!This)
73  {
74  retVal = DDERR_OUTOFVIDEOMEMORY;
76  }
77  }
78 
79  This->lpVtbl = &DirectDraw4_Vtable;
80  *obj = This;
82  }
83 
84  else if (IsEqualGUID(&IID_IDirectDraw2, id))
85  {
86  if (This->lpVtbl != &DirectDraw2_Vtable)
87  {
89  if (!This)
90  {
91  retVal = DDERR_OUTOFVIDEOMEMORY;
93  }
94  }
95 
96  This->lpVtbl = &DirectDraw2_Vtable;
97  *obj = This;
99  }
100  else if (IsEqualGUID(&IID_IDirectDraw, id))
101  {
102  if (This->lpVtbl != &DirectDraw_Vtable)
103  {
105  if (!This)
106  {
107  retVal = DDERR_OUTOFVIDEOMEMORY;
108  _SEH2_LEAVE;
109  }
110  }
111 
112  This->lpVtbl = &DirectDraw_Vtable;
113  *obj = This;
115  }
116  else
117  {
118  *obj = NULL;
119  DX_STUB_str("E_NOINTERFACE");
120  retVal = E_NOINTERFACE;
121  }
122  }
124  {
125  }
126  _SEH2_END;
127 
128  return retVal;
129 }
LPDDRAWI_DIRECTDRAW_INT internal_directdraw_int_alloc(LPDDRAWI_DIRECTDRAW_INT This)
Definition: ddraw_main.c:23
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define E_NOINTERFACE
Definition: winerror.h:2364
IDirectDrawVtbl DirectDraw_Vtable
Definition: ddraw_thunk.c:835
#define DX_STUB_str(x)
Definition: rosdraw.h:254
#define DDERR_OUTOFVIDEOMEMORY
Definition: ddraw.h:112
IDirectDraw2Vtbl DirectDraw2_Vtable
Definition: ddraw_thunk.c:862
_SEH2_TRY
Definition: create.c:4250
IDirectDraw4Vtbl DirectDraw4_Vtable
Definition: ddraw_thunk.c:890
#define DD_OK
Definition: ddraw.h:186
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
_SEH2_END
Definition: create.c:4424
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
ULONG WINAPI Main_DirectDraw_AddRef(LPDDRAWI_DIRECTDRAW_INT This)
Definition: ddraw_main.c:145
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define _SEH2_LEAVE
Definition: filesup.c:20
IDirectDraw7Vtbl DirectDraw7_Vtable

Referenced by ThunkDirectDraw2_QueryInterface(), ThunkDirectDraw4_QueryInterface(), and ThunkDirectDraw_QueryInterface().

◆ Main_DirectDraw_Release()

ULONG WINAPI Main_DirectDraw_Release ( LPDDRAWI_DIRECTDRAW_INT  This)

Definition at line 194 of file ddraw_main.c.

195 {
196  ULONG Counter = 0;
197 
198  DX_WINDBG_trace();
199 
200  /* Lock the thread */
202 
203  _SEH2_TRY
204  {
205  if (This!=NULL)
206  {
207  This->lpLcl->dwLocalRefCnt--;
208  This->dwIntRefCnt--;
209 
210  if (This->lpLcl->lpGbl != NULL)
211  {
212  This->lpLcl->lpGbl->dwRefCnt--;
213  }
214 
215  if ( This->lpLcl->lpGbl->dwRefCnt == 0)
216  {
217  // set resolution back to the one in registry
218  /*if(This->cooperative_level & DDSCL_EXCLUSIVE)
219  {
220  ChangeDisplaySettings(NULL, 0);
221  }*/
222 
223  Cleanup(This);
224  }
225 
226  /* FIXME cleanup being not call why ?? */
227  Counter = This->dwIntRefCnt;
228  }
229  else
230  {
231  Counter = This->dwIntRefCnt;
232  }
233  }
235  {
236  }
237  _SEH2_END;
238 
239  /* Release the thread lock */
241 
242  return Counter;
243 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
_SEH2_TRY
Definition: create.c:4250
VOID WINAPI AcquireDDThreadLock()
Definition: main.c:412
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
VOID WINAPI ReleaseDDThreadLock()
Definition: main.c:421
static const WCHAR Cleanup[]
Definition: register.c:80
_SEH2_END
Definition: create.c:4424
static LARGE_INTEGER Counter
Definition: clock.c:43
unsigned int ULONG
Definition: retypes.h:1
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6

Referenced by DirectDrawPalette_Release(), Main_DDrawSurface_Release4(), ThunkDirectDraw2_Release(), ThunkDirectDraw4_Release(), and ThunkDirectDraw_Release().

◆ Main_DirectDraw_RestoreAllSurfaces()

HRESULT WINAPI Main_DirectDraw_RestoreAllSurfaces ( LPDDRAWI_DIRECTDRAW_INT  This)

Definition at line 111 of file ddraw_stubs.c.

112 {
113  DX_WINDBG_trace();
114  DX_STUB;
115 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Referenced by ThunkDirectDraw4_RestoreAllSurfaces().

◆ Main_DirectDraw_RestoreDisplayMode()

HRESULT WINAPI Main_DirectDraw_RestoreDisplayMode ( LPDDRAWI_DIRECTDRAW_INT  This)

Definition at line 306 of file ddraw_displaymode.c.

307 {
308  DX_WINDBG_trace();
309 
310  _SEH2_TRY
311  {
313 
314  ChangeDisplaySettings(NULL, 0);
315 
316  // Update Interals
317 
318 
319  This->lpLcl->lpGbl->hDD = This->lpLcl->hDD;
322  }
324  {
325  }
326  _SEH2_END;
327 
328 
329  return DD_OK;
330 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define TRUE
Definition: types.h:120
_SEH2_TRY
Definition: create.c:4250
#define DD_OK
Definition: ddraw.h:186
#define DdReenableDirectDrawObject
Definition: ddrawgdi.h:33
unsigned int BOOL
Definition: ntddk_ex.h:94
struct IDirectDraw * LPDIRECTDRAW
Definition: ddraw.h:710
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI StartDirectDraw(LPDIRECTDRAW iface, LPGUID pGUID, BOOL reenable)
Definition: startup.c:180
static BOOLEAN ModeChanged
Definition: svga.c:282
_SEH2_END
Definition: create.c:4424
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6

Referenced by ThunkDirectDraw2_RestoreDisplayMode(), ThunkDirectDraw4_RestoreDisplayMode(), and ThunkDirectDraw_RestoreDisplayMode().

◆ Main_DirectDraw_SetCooperativeLevel()

HRESULT WINAPI Main_DirectDraw_SetCooperativeLevel ( LPDDRAWI_DIRECTDRAW_INT  This,
HWND  hwnd,
DWORD  cooplevel 
)
  • Handle those levels first which set various hwnds */
  • DDSCL_NORMAL or DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE */

Definition at line 13 of file ddraw_setcooperativelevel.c.

14 {
15  HRESULT retVal = DD_OK;
16 
17 
19 
20  _SEH2_TRY
21  {
22 
23  if (hwnd && !IsWindow(hwnd))
24  {
25  retVal = DDERR_INVALIDPARAMS;
27  }
28 
29  // FIXME test if 0x20 exists as a flag and what thuse it do
33  {
34 
35  retVal = DDERR_INVALIDPARAMS;
37  }
38 
39  if (!( cooplevel & (DDSCL_NORMAL | DDSCL_EXCLUSIVE | DDSCL_SETFOCUSWINDOW)))
40  {
41  retVal = DDERR_INVALIDPARAMS;
43  }
44 
45  if ((cooplevel & DDSCL_FPUSETUP) && (cooplevel & DDSCL_FPUPRESERVE))
46  {
47  retVal = DDERR_INVALIDPARAMS;
49  }
50 
51  if ((cooplevel & DDSCL_EXCLUSIVE) && (!(cooplevel & DDSCL_FULLSCREEN)))
52  {
53  retVal = DDERR_INVALIDPARAMS;
55  }
56 
57  if ((cooplevel & DDSCL_ALLOWMODEX) && (!(cooplevel & DDSCL_FULLSCREEN)))
58  {
59  retVal = DDERR_INVALIDPARAMS;
61  }
62 
63  if ((cooplevel & (DDSCL_CREATEDEVICEWINDOW | DDSCL_SETFOCUSWINDOW)))
64  {
65  retVal = DDERR_INVALIDPARAMS;
67  }
68 
69  if (!cooplevel)
70  {
71  retVal = DDERR_INVALIDPARAMS;
73  }
74 
75 
76  /* NORMAL MODE */
77  if(!(cooplevel & (~DDSCL_NORMAL)))
78  {
79  /* FIXME in setup.c set DDRAWI_UMODELOADED | DDRAWI_DISPLAYDRV | DDRAWI_EMULATIONINITIALIZED | DDRAWI_GDIDRV | DDRAWI_ATTACHEDTODESKTOP */
80  /* FIXME in setup.c This->lpLcl->lpGbl->dwFlags = */
81 
82  This->lpLcl->dwLocalFlags = DDRAWILCL_SETCOOPCALLED | DDRAWILCL_DIRECTDRAW7 ;
83  This->lpLcl->hWnd = (ULONG_PTR) hwnd;
84  This->lpLcl->hFocusWnd = (ULONG_PTR) hwnd;
85  This->lpLcl->lpGbl->lpExclusiveOwner=NULL;
86 
87  retVal = DD_OK;
89  }
90 
91  /* FULLSCREEN */
92  if ((!(cooplevel & (~(DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN)))) ||
93  (!(cooplevel & (~(DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_ALLOWMODEX)))))
94 
95  {
96  /* FIXME in setup.c This->lpLcl->lpGbl->dwFlags = */
97 
98  if (hwnd == NULL)
99  {
100  retVal = DDERR_INVALIDPARAMS;
101  _SEH2_LEAVE;
102  }
103 
105  {
106  retVal = DDERR_INVALIDPARAMS;
107  _SEH2_LEAVE;
108  }
109 
110  if( (This->lpLcl->lpGbl->lpExclusiveOwner != NULL) &&
111  (This->lpLcl->lpGbl->lpExclusiveOwner != This->lpLcl) )
112  {
113  retVal = DDERR_INVALIDPARAMS;
114  _SEH2_LEAVE;
115  }
116 
117  This->lpLcl->lpGbl->lpExclusiveOwner = This-> lpLcl;
118 
122 
123  if (cooplevel & DDSCL_ALLOWMODEX)
124  {
125  This->lpLcl->dwLocalFlags = This->lpLcl->dwLocalFlags | DDRAWILCL_ALLOWMODEX;
126  }
127 
128  This->lpLcl->hWnd = (ULONG_PTR) hwnd;
129  This->lpLcl->hFocusWnd = (ULONG_PTR) hwnd;
130 
131 
132  /* FIXME fullscreen are not finuish */
133 
134  retVal = DD_OK;
135  _SEH2_LEAVE;
136  }
137 
138  /*
139  * Code from wine, this functions have been cut and paste from wine 0.9.35
140  * and have been modify allot and are still in devloping so it match with
141  * msdn document struct and flags
142  */
143 
144 
145 
147  //if(cooplevel & DDSCL_SETFOCUSWINDOW)
148  //{
149  //
150 
151  // if(This->lpLcl->dwLocalFlags & DDRAWILCL_SETCOOPCALLED)
152  // {
153  // retVal = DDERR_HWNDALREADYSET;
154  // _SEH2_LEAVE;
155  // }
156  // else if( (This->lpLcl->dwLocalFlags & DDRAWILCL_ISFULLSCREEN) && window)
157  // {
158  // retVal = DDERR_HWNDALREADYSET;
159  // _SEH2_LEAVE;
160  // }
161 
162  // This->lpLcl->hFocusWnd = (ULONG_PTR) hwnd;
163 
164 
165  // /* Won't use the hwnd param for anything else */
166  // hwnd = NULL;
167 
168  // /* Use the focus window for drawing too */
169  // This->lpLcl->hWnd = This->lpLcl->hFocusWnd;
170 
171  //}
172 
174  //if(cooplevel & DDSCL_NORMAL)
175  //{
176  // /* Can't coexist with fullscreen or exclusive */
177  // if(cooplevel & (DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE) )
178  // {
179  // retVal = DDERR_INVALIDPARAMS;
180  // _SEH2_LEAVE;
181  // }
182 
183  // /* Switching from fullscreen? */
184  // if(This->lpLcl->dwLocalFlags & DDRAWILCL_ISFULLSCREEN)
185  // {
186  // /* Restore the display mode */
187  // Main_DirectDraw_RestoreDisplayMode(iface);
188 
189  // This->lpLcl->dwLocalFlags &= ~DDRAWILCL_ISFULLSCREEN;
190  // This->lpLcl->dwLocalFlags &= ~DDRAWILCL_HASEXCLUSIVEMODE;
191  // This->lpLcl->dwLocalFlags &= ~DDRAWILCL_ALLOWMODEX;
192  // }
193 
194  // /* Don't override focus windows or private device windows */
195  // if( hwnd &&
196  // !(This->lpLcl->hFocusWnd) &&
197  // !(This->lpLcl->dwObsolete1) &&
198  // (hwnd != window) )
199  // {
200  // This->lpLcl->hWnd = (ULONG_PTR)hwnd;
201  // }
202 
203  // /* FIXME GL
204  // IWineD3DDevice_SetFullscreen(This->wineD3DDevice,
205  // FALSE);
206  // */
207  // }
208  // else if(cooplevel & DDSCL_FULLSCREEN)
209  // {
210  // /* Needs DDSCL_EXCLUSIVE */
211  // if(!(cooplevel & DDSCL_EXCLUSIVE) )
212  // {
213  // retVal = DDERR_INVALIDPARAMS;
214  // _SEH2_LEAVE;
215  // }
216 
217  // /* Switch from normal to full screen mode? */
218  // if (!(This->lpLcl->dwLocalFlags & DDRAWILCL_HASEXCLUSIVEMODE))
219  // {
220  // /* FIXME GL
221  // IWineD3DDevice_SetFullscreen(This->wineD3DDevice,
222  // TRUE);
223  // */
224  // }
225 
226  // /* Don't override focus windows or private device windows */
227  // if( hwnd &&
228  // !(This->lpLcl->hFocusWnd) &&
229  // !(This->lpLcl->dwObsolete1) &&
230  // (hwnd != window) )
231  // {
232  // This->lpLcl->hWnd = (ULONG_PTR) hwnd;
233  // }
234  // }
235  // else if(cooplevel & DDSCL_EXCLUSIVE)
236  // {
237  // retVal = DDERR_INVALIDPARAMS;
238  // _SEH2_LEAVE;
239  // }
240 
241  // if(cooplevel & DDSCL_CREATEDEVICEWINDOW)
242  // {
243  // /* Don't create a device window if a focus window is set */
244  // if( !This->lpLcl->hFocusWnd)
245  // {
246  // HWND devicewindow = CreateWindowExW(0, classname, L"DDraw device window",
247  // WS_POPUP, 0, 0,
248  // GetSystemMetrics(SM_CXSCREEN),
249  // GetSystemMetrics(SM_CYSCREEN),
250  // NULL, NULL, GetModuleHandleW(0), NULL);
251 
252  // ShowWindow(devicewindow, SW_SHOW); /* Just to be sure */
253 
254  // This->lpLcl->dwObsolete1 = (DWORD)devicewindow;
255  // }
256  // }
257 
258  // if(cooplevel & DDSCL_MULTITHREADED && !(This->lpLcl->dwLocalFlags & DDRAWILCL_MULTITHREADED))
259  // {
260  // /* FIXME GL
261  // * IWineD3DDevice_SetMultithreaded(This->wineD3DDevice);
262  // */
263  // }
264 
265 
266 
267  // /* Store the cooperative_level */
268 
269  // /* FIXME GL
270  // * This->cooperative_level |= cooplevel;
271  // */
272  }
274  {
275  }
276  _SEH2_END;
277 
278 
279  return retVal;
280 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define DDSCL_MULTITHREADED
Definition: ddraw.h:541
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define DDRAWILCL_HASEXCLUSIVEMODE
Definition: ddrawi.h:1194
#define DDRAWILCL_CURSORCLIPPED
Definition: ddrawi.h:1206
#define DDRAWILCL_ACTIVEYES
Definition: ddrawi.h:1197
#define WS_CHILD
Definition: pedump.c:617
_SEH2_TRY
Definition: create.c:4250
#define DDSCL_EXCLUSIVE
Definition: ddraw.h:536
#define DDSCL_ALLOWMODEX
Definition: ddraw.h:537
#define DD_OK
Definition: ddraw.h:186
#define DDRAWILCL_DIRECTDRAW7
Definition: ddrawi.h:1211
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
#define DDSCL_SETDEVICEWINDOW
Definition: ddraw.h:539
#define DDSCL_ALLOWREBOOT
Definition: ddraw.h:533
LONG HRESULT
Definition: typedefs.h:77
#define DDSCL_FPUPRESERVE
Definition: ddraw.h:543
#define GWL_STYLE
Definition: winuser.h:846
#define DDSCL_FPUSETUP
Definition: ddraw.h:542
_SEH2_END
Definition: create.c:4424
#define DDSCL_SETFOCUSWINDOW
Definition: ddraw.h:538
#define DDSCL_FULLSCREEN
Definition: ddraw.h:532
#define DDSCL_NOWINDOWCHANGES
Definition: ddraw.h:534
#define DDRAWILCL_ISFULLSCREEN
Definition: ddrawi.h:1195
#define ULONG_PTR
Definition: config.h:101
#define DDSCL_NORMAL
Definition: ddraw.h:535
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define GetWindowLongPtr
Definition: treelist.c:73
#define DDRAWILCL_HOOKEDHWND
Definition: ddrawi.h:1199
#define _SEH2_LEAVE
Definition: filesup.c:20
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
#define DDRAWILCL_ALLOWMODEX
Definition: ddrawi.h:1200
#define DDRAWILCL_SETCOOPCALLED
Definition: ddrawi.h:1196
#define DDSCL_CREATEDEVICEWINDOW
Definition: ddraw.h:540

Referenced by ThunkDirectDraw2_SetCooperativeLevel(), ThunkDirectDraw4_SetCooperativeLevel(), and ThunkDirectDraw_SetCooperativeLevel().

◆ Main_DirectDraw_SetDisplayMode()

HRESULT WINAPI Main_DirectDraw_SetDisplayMode ( LPDDRAWI_DIRECTDRAW_INT  This,
DWORD  dwWidth,
DWORD  dwHeight,
DWORD  dwBPP 
)

Definition at line 210 of file ddraw_displaymode.c.

211 {
212  DX_WINDBG_trace();
213 
214  return Main_DirectDraw_SetDisplayMode2 (This, dwWidth, dwHeight, dwBPP, 0, 0 );
215 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
static const WCHAR dwHeight[]
Definition: provider.c:63
HRESULT WINAPI Main_DirectDraw_SetDisplayMode2(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags)
static const WCHAR dwWidth[]
Definition: provider.c:62

Referenced by ThunkDirectDraw2_SetDisplayMode(), ThunkDirectDraw4_SetDisplayMode(), and ThunkDirectDraw_SetDisplayMode().

◆ Main_DirectDraw_SetDisplayMode2()

HRESULT WINAPI Main_DirectDraw_SetDisplayMode2 ( LPDDRAWI_DIRECTDRAW_INT  This,
DWORD  dwWidth,
DWORD  dwHeight,
DWORD  dwBPP,
DWORD  dwRefreshRate,
DWORD  dwFlags 
)

Definition at line 218 of file ddraw_displaymode.c.

220 {
221  HRESULT ret = DD_OK;
222  DX_WINDBG_trace();
223 
224  _SEH2_TRY
225  {
226  // FIXME: Check primary if surface is locked / busy etc.
227 
228  // Check Parameters
229  if(dwFlags != 0)
230  {
232  }
233  else
234  {
235  if ((!dwHeight || This->lpLcl->lpGbl->vmiData.dwDisplayHeight == dwHeight) &&
236  (!dwWidth || This->lpLcl->lpGbl->vmiData.dwDisplayWidth == dwWidth) &&
237  (!dwBPP || This->lpLcl->lpGbl->vmiData.ddpfDisplay.dwRGBBitCount == dwBPP) &&
238  (!dwRefreshRate || This->lpLcl->lpGbl->dwMonitorFrequency == dwRefreshRate))
239  {
240  ret = DD_OK; // nothing to do here for us
241  }
242  else
243  {
244  LONG retval;
245  // Here we go
246  DEVMODE DevMode;
247  ZeroMemory(&DevMode, sizeof(DEVMODE));
248  DevMode.dmSize = sizeof(DEVMODE);
249 
250  if (dwHeight)
251  DevMode.dmFields |= DM_PELSHEIGHT;
252  if (dwWidth)
253  DevMode.dmFields |= DM_PELSWIDTH;
254  if (dwBPP)
255  DevMode.dmFields |= DM_BITSPERPEL;
256  if (dwRefreshRate)
257  DevMode.dmFields |= DM_DISPLAYFREQUENCY;
258 
259  DevMode.dmPelsHeight = dwHeight;
260  DevMode.dmPelsWidth = dwWidth;
261  DevMode.dmBitsPerPel = dwBPP;
263 
265 
266  retval = ChangeDisplaySettings(&DevMode, CDS_FULLSCREEN);
267  /* FIXME: Are we supposed to set CDS_SET_PRIMARY as well ? */
268 
269  if(retval == DISP_CHANGE_BADMODE)
270  {
271  /* Note : it seam ms ddraw ignore this and try using the bad mode any case.
272  * tested with Ati HD2400 that only support 16 and 32 Bpp in windows
273  */
274  DX_STUB_str("Warning ChangeDisplaySettings return DISP_CHANGE_BADMODE, but ddraw.dll ignore it\n");
275 
276  //ret = DDERR_UNSUPPORTED;
278  This->lpLcl->lpGbl->hDD = This->lpLcl->hDD;
281  }
282  else if(retval != DISP_CHANGE_SUCCESSFUL)
283  {
284  ret = DDERR_GENERIC;
285  }
286  else
287  {
288  // Update Interals
290  This->lpLcl->lpGbl->hDD = This->lpLcl->hDD;
293  }
294  }
295  }
296  }
298  {
299  }
300  _SEH2_END;
301 
302  return ret;
303 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define TRUE
Definition: types.h:120
WORD dmSize
Definition: wingdi.h:1563
DWORD dmDisplayFrequency
Definition: wingdi.h:1597
#define CDS_FULLSCREEN
Definition: winuser.h:183
#define DISP_CHANGE_BADMODE
Definition: winuser.h:195
#define DX_STUB_str(x)
Definition: rosdraw.h:254
#define ZeroMemory
Definition: winbase.h:1642
DEVMODEA DEVMODE
Definition: wingdi.h:4413
#define DX_WINDBG_trace_res(width, height, bpp, freq)
Definition: rosdraw.h:273
_SEH2_TRY
Definition: create.c:4250
#define DM_PELSWIDTH
Definition: wingdi.h:1268
#define DD_OK
Definition: ddraw.h:186
#define DdReenableDirectDrawObject
Definition: ddrawgdi.h:33
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
struct IDirectDraw * LPDIRECTDRAW
Definition: ddraw.h:710
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
static const WCHAR dwHeight[]
Definition: provider.c:63
#define DDERR_GENERIC
Definition: ddraw.h:72
LONG HRESULT
Definition: typedefs.h:77
#define DISP_CHANGE_SUCCESSFUL
Definition: winuser.h:190
HRESULT WINAPI StartDirectDraw(LPDIRECTDRAW iface, LPGUID pGUID, BOOL reenable)
Definition: startup.c:180
DWORD dmPelsHeight
Definition: wingdi.h:1592
DWORD dmFields
Definition: wingdi.h:1565
DWORD dwRefreshRate
Definition: ddraw.h:1135
int ret
static BOOLEAN ModeChanged
Definition: svga.c:282
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define DM_DISPLAYFREQUENCY
Definition: wingdi.h:1271
DWORD dmBitsPerPel
Definition: wingdi.h:1590
_SEH2_END
Definition: create.c:4424
#define DM_PELSHEIGHT
Definition: wingdi.h:1269
#define DM_BITSPERPEL
Definition: wingdi.h:1267
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
static const WCHAR dwWidth[]
Definition: provider.c:62
DWORD dmPelsWidth
Definition: wingdi.h:1591

Referenced by Main_DirectDraw_SetDisplayMode().

◆ Main_DirectDraw_StartModeTest()

HRESULT WINAPI Main_DirectDraw_StartModeTest ( LPDDRAWI_DIRECTDRAW_INT  This,
LPSIZE  pModes,
DWORD  dwNumModes,
DWORD  dwFlags 
)

Definition at line 124 of file ddraw_stubs.c.

126 {
127  DX_WINDBG_trace();
128  DX_STUB;
129 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

◆ Main_DirectDraw_TestCooperativeLevel()

HRESULT WINAPI Main_DirectDraw_TestCooperativeLevel ( LPDDRAWI_DIRECTDRAW_INT  This)

Definition at line 117 of file ddraw_stubs.c.

118 {
119  DX_WINDBG_trace();
120  DX_STUB;
121 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Referenced by ThunkDirectDraw4_TestCooperativeLevel().

◆ Main_DirectDraw_WaitForVerticalBlank()

HRESULT WINAPI Main_DirectDraw_WaitForVerticalBlank ( LPDDRAWI_DIRECTDRAW_INT  This,
DWORD  dwFlags,
HANDLE  h 
)

Definition at line 97 of file ddraw_stubs.c.

99 {
100  DX_WINDBG_trace();
101  DX_STUB;
102 }
#define DX_WINDBG_trace()
Definition: rosdraw.h:262
#define DX_STUB
Definition: rosdraw.h:224

Referenced by ThunkDirectDraw2_WaitForVerticalBlank(), ThunkDirectDraw4_WaitForVerticalBlank(), and ThunkDirectDraw_WaitForVerticalBlank().