ReactOS  0.4.14-dev-368-gfa26425
ddraw.c File Reference
#include "config.h"
#include "wine/port.h"
#include "ddraw_private.h"
#include "wine/exception.h"
Include dependency graph for ddraw.c:

Go to the source code of this file.

Classes

struct  enum_device_entry
 
struct  displaymodescallback_context
 
struct  surfacescallback2_context
 
struct  surfacescallback_context
 

Macros

#define CMP(FLAG, FIELD)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (ddraw)
 
static void STDMETHODCALLTYPE ddraw_null_wined3d_object_destroyed (void *parent)
 
static struct ddrawimpl_from_IDirectDraw (IDirectDraw *iface)
 
static struct ddrawimpl_from_IDirectDraw2 (IDirectDraw2 *iface)
 
static struct ddrawimpl_from_IDirectDraw4 (IDirectDraw4 *iface)
 
static struct ddrawimpl_from_IDirectDraw7 (IDirectDraw7 *iface)
 
static struct ddrawimpl_from_IDirect3D (IDirect3D *iface)
 
static struct ddrawimpl_from_IDirect3D2 (IDirect3D2 *iface)
 
static struct ddrawimpl_from_IDirect3D3 (IDirect3D3 *iface)
 
static struct ddrawimpl_from_IDirect3D7 (IDirect3D7 *iface)
 
static HRESULT WINAPI ddraw7_QueryInterface (IDirectDraw7 *iface, REFIID riid, void **out)
 
static HRESULT WINAPI ddraw4_QueryInterface (IDirectDraw4 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw2_QueryInterface (IDirectDraw2 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI ddraw1_QueryInterface (IDirectDraw *iface, REFIID riid, void **object)
 
static HRESULT WINAPI d3d7_QueryInterface (IDirect3D7 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI d3d3_QueryInterface (IDirect3D3 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI d3d2_QueryInterface (IDirect3D2 *iface, REFIID riid, void **object)
 
static HRESULT WINAPI d3d1_QueryInterface (IDirect3D *iface, REFIID riid, void **object)
 
static ULONG WINAPI ddraw7_AddRef (IDirectDraw7 *iface)
 
static ULONG WINAPI ddraw4_AddRef (IDirectDraw4 *iface)
 
static ULONG WINAPI ddraw2_AddRef (IDirectDraw2 *iface)
 
static ULONG WINAPI ddraw1_AddRef (IDirectDraw *iface)
 
static ULONG WINAPI d3d7_AddRef (IDirect3D7 *iface)
 
static ULONG WINAPI d3d3_AddRef (IDirect3D3 *iface)
 
static ULONG WINAPI d3d2_AddRef (IDirect3D2 *iface)
 
static ULONG WINAPI d3d1_AddRef (IDirect3D *iface)
 
static void ddraw_destroy_swapchain (struct ddraw *ddraw)
 
static void ddraw_destroy (struct ddraw *This)
 
static ULONG WINAPI ddraw7_Release (IDirectDraw7 *iface)
 
static ULONG WINAPI ddraw4_Release (IDirectDraw4 *iface)
 
static ULONG WINAPI ddraw2_Release (IDirectDraw2 *iface)
 
static ULONG WINAPI ddraw1_Release (IDirectDraw *iface)
 
static ULONG WINAPI d3d7_Release (IDirect3D7 *iface)
 
static ULONG WINAPI d3d3_Release (IDirect3D3 *iface)
 
static ULONG WINAPI d3d2_Release (IDirect3D2 *iface)
 
static ULONG WINAPI d3d1_Release (IDirect3D *iface)
 
static HRESULT ddraw_set_focus_window (struct ddraw *ddraw, HWND window)
 
static HRESULT ddraw_attach_d3d_device (struct ddraw *ddraw, struct wined3d_swapchain_desc *swapchain_desc)
 
static HRESULT ddraw_create_swapchain (struct ddraw *ddraw, HWND window, BOOL windowed)
 
static HRESULT WINAPI ddraw7_RestoreDisplayMode (IDirectDraw7 *iface)
 
static HRESULT WINAPI ddraw4_RestoreDisplayMode (IDirectDraw4 *iface)
 
static HRESULT WINAPI ddraw2_RestoreDisplayMode (IDirectDraw2 *iface)
 
static HRESULT WINAPI ddraw1_RestoreDisplayMode (IDirectDraw *iface)
 
static HRESULT ddraw_set_cooperative_level (struct ddraw *ddraw, HWND window, DWORD cooplevel, BOOL restore_mode_on_normal)
 
static HRESULT WINAPI ddraw7_SetCooperativeLevel (IDirectDraw7 *iface, HWND window, DWORD flags)
 
static HRESULT WINAPI ddraw4_SetCooperativeLevel (IDirectDraw4 *iface, HWND window, DWORD flags)
 
static HRESULT WINAPI ddraw2_SetCooperativeLevel (IDirectDraw2 *iface, HWND window, DWORD flags)
 
static HRESULT WINAPI ddraw1_SetCooperativeLevel (IDirectDraw *iface, HWND window, DWORD flags)
 
static HRESULT WINAPI ddraw7_SetDisplayMode (IDirectDraw7 *iface, DWORD width, DWORD height, DWORD bpp, DWORD refresh_rate, DWORD flags)
 
static HRESULT WINAPI ddraw4_SetDisplayMode (IDirectDraw4 *iface, DWORD width, DWORD height, DWORD bpp, DWORD refresh_rate, DWORD flags)
 
static HRESULT WINAPI ddraw2_SetDisplayMode (IDirectDraw2 *iface, DWORD width, DWORD height, DWORD bpp, DWORD refresh_rate, DWORD flags)
 
static HRESULT WINAPI ddraw1_SetDisplayMode (IDirectDraw *iface, DWORD width, DWORD height, DWORD bpp)
 
void ddraw_d3dcaps1_from_7 (D3DDEVICEDESC *caps1, D3DDEVICEDESC7 *caps7)
 
HRESULT ddraw_get_d3dcaps (const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
 
HRESULT CALLBACK enum_zbuffer (DDPIXELFORMAT *format, void *ctx)
 
static HRESULT WINAPI ddraw7_GetCaps (IDirectDraw7 *iface, DDCAPS *DriverCaps, DDCAPS *HELCaps)
 
static HRESULT WINAPI ddraw4_GetCaps (IDirectDraw4 *iface, DDCAPS *driver_caps, DDCAPS *hel_caps)
 
static HRESULT WINAPI ddraw2_GetCaps (IDirectDraw2 *iface, DDCAPS *driver_caps, DDCAPS *hel_caps)
 
static HRESULT WINAPI ddraw1_GetCaps (IDirectDraw *iface, DDCAPS *driver_caps, DDCAPS *hel_caps)
 
static HRESULT WINAPI ddraw7_Compact (IDirectDraw7 *iface)
 
static HRESULT WINAPI ddraw4_Compact (IDirectDraw4 *iface)
 
static HRESULT WINAPI ddraw2_Compact (IDirectDraw2 *iface)
 
static HRESULT WINAPI ddraw1_Compact (IDirectDraw *iface)
 
static HRESULT WINAPI ddraw7_GetDisplayMode (IDirectDraw7 *iface, DDSURFACEDESC2 *DDSD)
 
static HRESULT WINAPI ddraw4_GetDisplayMode (IDirectDraw4 *iface, DDSURFACEDESC2 *surface_desc)
 
static HRESULT WINAPI ddraw2_GetDisplayMode (IDirectDraw2 *iface, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI ddraw1_GetDisplayMode (IDirectDraw *iface, DDSURFACEDESC *surface_desc)
 
static HRESULT WINAPI ddraw7_GetFourCCCodes (IDirectDraw7 *iface, DWORD *NumCodes, DWORD *Codes)
 
static HRESULT WINAPI ddraw4_GetFourCCCodes (IDirectDraw4 *iface, DWORD *codes_count, DWORD *codes)
 
static HRESULT WINAPI ddraw2_GetFourCCCodes (IDirectDraw2 *iface, DWORD *codes_count, DWORD *codes)
 
static HRESULT WINAPI ddraw1_GetFourCCCodes (IDirectDraw *iface, DWORD *codes_count, DWORD *codes)
 
static HRESULT WINAPI ddraw7_GetMonitorFrequency (IDirectDraw7 *iface, DWORD *frequency)
 
static HRESULT WINAPI ddraw4_GetMonitorFrequency (IDirectDraw4 *iface, DWORD *frequency)
 
static HRESULT WINAPI ddraw2_GetMonitorFrequency (IDirectDraw2 *iface, DWORD *frequency)
 
static HRESULT WINAPI ddraw1_GetMonitorFrequency (IDirectDraw *iface, DWORD *frequency)
 
static HRESULT WINAPI ddraw7_GetVerticalBlankStatus (IDirectDraw7 *iface, BOOL *status)
 
static HRESULT WINAPI ddraw4_GetVerticalBlankStatus (IDirectDraw4 *iface, BOOL *status)
 
static HRESULT WINAPI ddraw2_GetVerticalBlankStatus (IDirectDraw2 *iface, BOOL *status)
 
static HRESULT WINAPI ddraw1_GetVerticalBlankStatus (IDirectDraw *iface, BOOL *status)
 
static HRESULT WINAPI ddraw7_GetAvailableVidMem (IDirectDraw7 *iface, DDSCAPS2 *caps, DWORD *total, DWORD *free)
 
static HRESULT WINAPI ddraw4_GetAvailableVidMem (IDirectDraw4 *iface, DDSCAPS2 *caps, DWORD *total, DWORD *free)
 
static HRESULT WINAPI ddraw2_GetAvailableVidMem (IDirectDraw2 *iface, DDSCAPS *caps, DWORD *total, DWORD *free)
 
static HRESULT WINAPI ddraw7_Initialize (IDirectDraw7 *iface, GUID *guid)
 
static HRESULT WINAPI ddraw4_Initialize (IDirectDraw4 *iface, GUID *guid)
 
static HRESULT WINAPI ddraw2_Initialize (IDirectDraw2 *iface, GUID *guid)
 
static HRESULT WINAPI ddraw1_Initialize (IDirectDraw *iface, GUID *guid)
 
static HRESULT WINAPI d3d1_Initialize (IDirect3D *iface, REFIID riid)
 
static HRESULT WINAPI ddraw7_FlipToGDISurface (IDirectDraw7 *iface)
 
static HRESULT WINAPI ddraw4_FlipToGDISurface (IDirectDraw4 *iface)
 
static HRESULT WINAPI ddraw2_FlipToGDISurface (IDirectDraw2 *iface)
 
static HRESULT WINAPI ddraw1_FlipToGDISurface (IDirectDraw *iface)
 
static HRESULT WINAPI ddraw7_WaitForVerticalBlank (IDirectDraw7 *iface, DWORD Flags, HANDLE event)
 
static HRESULT WINAPI ddraw4_WaitForVerticalBlank (IDirectDraw4 *iface, DWORD flags, HANDLE event)
 
static HRESULT WINAPI ddraw2_WaitForVerticalBlank (IDirectDraw2 *iface, DWORD flags, HANDLE event)
 
static HRESULT WINAPI ddraw1_WaitForVerticalBlank (IDirectDraw *iface, DWORD flags, HANDLE event)
 
static HRESULT WINAPI ddraw7_GetScanLine (IDirectDraw7 *iface, DWORD *Scanline)
 
static HRESULT WINAPI ddraw4_GetScanLine (IDirectDraw4 *iface, DWORD *line)
 
static HRESULT WINAPI ddraw2_GetScanLine (IDirectDraw2 *iface, DWORD *line)
 
static HRESULT WINAPI ddraw1_GetScanLine (IDirectDraw *iface, DWORD *line)
 
static HRESULT WINAPI ddraw7_TestCooperativeLevel (IDirectDraw7 *iface)
 
static HRESULT WINAPI ddraw4_TestCooperativeLevel (IDirectDraw4 *iface)
 
static HRESULT WINAPI ddraw7_GetGDISurface (IDirectDraw7 *iface, IDirectDrawSurface7 **GDISurface)
 
static HRESULT WINAPI ddraw4_GetGDISurface (IDirectDraw4 *iface, IDirectDrawSurface4 **surface)
 
static HRESULT WINAPI ddraw2_GetGDISurface (IDirectDraw2 *iface, IDirectDrawSurface **surface)
 
static HRESULT WINAPI ddraw1_GetGDISurface (IDirectDraw *iface, IDirectDrawSurface **surface)
 
static HRESULT CALLBACK EnumDisplayModesCallbackThunk (DDSURFACEDESC2 *surface_desc, void *context)
 
static HRESULT WINAPI ddraw7_EnumDisplayModes (IDirectDraw7 *iface, DWORD Flags, DDSURFACEDESC2 *DDSD, void *Context, LPDDENUMMODESCALLBACK2 cb)
 
static HRESULT WINAPI ddraw4_EnumDisplayModes (IDirectDraw4 *iface, DWORD flags, DDSURFACEDESC2 *surface_desc, void *context, LPDDENUMMODESCALLBACK2 callback)
 
static HRESULT WINAPI ddraw2_EnumDisplayModes (IDirectDraw2 *iface, DWORD flags, DDSURFACEDESC *surface_desc, void *context, LPDDENUMMODESCALLBACK callback)
 
static HRESULT WINAPI ddraw1_EnumDisplayModes (IDirectDraw *iface, DWORD flags, DDSURFACEDESC *surface_desc, void *context, LPDDENUMMODESCALLBACK callback)
 
static HRESULT WINAPI ddraw7_EvaluateMode (IDirectDraw7 *iface, DWORD Flags, DWORD *Timeout)
 
static HRESULT WINAPI ddraw7_GetDeviceIdentifier (IDirectDraw7 *iface, DDDEVICEIDENTIFIER2 *DDDI, DWORD Flags)
 
static HRESULT WINAPI ddraw4_GetDeviceIdentifier (IDirectDraw4 *iface, DDDEVICEIDENTIFIER *identifier, DWORD flags)
 
static HRESULT WINAPI ddraw7_GetSurfaceFromDC (IDirectDraw7 *iface, HDC dc, IDirectDrawSurface7 **surface)
 
static HRESULT WINAPI ddraw4_GetSurfaceFromDC (IDirectDraw4 *iface, HDC dc, IDirectDrawSurface4 **surface)
 
static HRESULT CALLBACK restore_callback (IDirectDrawSurface7 *surface, DDSURFACEDESC2 *desc, void *context)
 
static HRESULT WINAPI ddraw7_RestoreAllSurfaces (IDirectDraw7 *iface)
 
static HRESULT WINAPI ddraw4_RestoreAllSurfaces (IDirectDraw4 *iface)
 
static HRESULT WINAPI ddraw7_StartModeTest (IDirectDraw7 *iface, SIZE *Modes, DWORD NumModes, DWORD Flags)
 
static HRESULT WINAPI ddraw7_CreateSurface (IDirectDraw7 *iface, DDSURFACEDESC2 *surface_desc, IDirectDrawSurface7 **surface, IUnknown *outer_unknown)
 
static HRESULT WINAPI ddraw4_CreateSurface (IDirectDraw4 *iface, DDSURFACEDESC2 *surface_desc, IDirectDrawSurface4 **surface, IUnknown *outer_unknown)
 
static HRESULT WINAPI ddraw2_CreateSurface (IDirectDraw2 *iface, DDSURFACEDESC *surface_desc, IDirectDrawSurface **surface, IUnknown *outer_unknown)
 
static HRESULT WINAPI ddraw1_CreateSurface (IDirectDraw *iface, DDSURFACEDESC *surface_desc, IDirectDrawSurface **surface, IUnknown *outer_unknown)
 
static BOOL Main_DirectDraw_DDPIXELFORMAT_Match (const DDPIXELFORMAT *requested, const DDPIXELFORMAT *provided)
 
static BOOL ddraw_match_surface_desc (const DDSURFACEDESC2 *requested, const DDSURFACEDESC2 *provided)
 
static HRESULT CALLBACK EnumSurfacesCallback2Thunk (IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
 
static HRESULT CALLBACK EnumSurfacesCallbackThunk (IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
 
static HRESULT WINAPI ddraw7_EnumSurfaces (IDirectDraw7 *iface, DWORD Flags, DDSURFACEDESC2 *DDSD, void *Context, LPDDENUMSURFACESCALLBACK7 Callback)
 
static HRESULT WINAPI ddraw4_EnumSurfaces (IDirectDraw4 *iface, DWORD flags, DDSURFACEDESC2 *surface_desc, void *context, LPDDENUMSURFACESCALLBACK2 callback)
 
static HRESULT WINAPI ddraw2_EnumSurfaces (IDirectDraw2 *iface, DWORD flags, DDSURFACEDESC *surface_desc, void *context, LPDDENUMSURFACESCALLBACK callback)
 
static HRESULT WINAPI ddraw1_EnumSurfaces (IDirectDraw *iface, DWORD flags, DDSURFACEDESC *surface_desc, void *context, LPDDENUMSURFACESCALLBACK callback)
 
HRESULT WINAPI DirectDrawCreateClipper (DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer_unknown)
 
static HRESULT WINAPI ddraw7_CreateClipper (IDirectDraw7 *iface, DWORD Flags, IDirectDrawClipper **Clipper, IUnknown *UnkOuter)
 
static HRESULT WINAPI ddraw4_CreateClipper (IDirectDraw4 *iface, DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer_unknown)
 
static HRESULT WINAPI ddraw2_CreateClipper (IDirectDraw2 *iface, DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer_unknown)
 
static HRESULT WINAPI ddraw1_CreateClipper (IDirectDraw *iface, DWORD flags, IDirectDrawClipper **clipper, IUnknown *outer_unknown)
 
static HRESULT WINAPI ddraw7_CreatePalette (IDirectDraw7 *iface, DWORD Flags, PALETTEENTRY *ColorTable, IDirectDrawPalette **Palette, IUnknown *pUnkOuter)
 
static HRESULT WINAPI ddraw4_CreatePalette (IDirectDraw4 *iface, DWORD flags, PALETTEENTRY *entries, IDirectDrawPalette **palette, IUnknown *outer_unknown)
 
static HRESULT WINAPI ddraw2_CreatePalette (IDirectDraw2 *iface, DWORD flags, PALETTEENTRY *entries, IDirectDrawPalette **palette, IUnknown *outer_unknown)
 
static HRESULT WINAPI ddraw1_CreatePalette (IDirectDraw *iface, DWORD flags, PALETTEENTRY *entries, IDirectDrawPalette **palette, IUnknown *outer_unknown)
 
static HRESULT WINAPI ddraw7_DuplicateSurface (IDirectDraw7 *iface, IDirectDrawSurface7 *Src, IDirectDrawSurface7 **Dest)
 
static HRESULT WINAPI ddraw4_DuplicateSurface (IDirectDraw4 *iface, IDirectDrawSurface4 *src, IDirectDrawSurface4 **dst)
 
static HRESULT WINAPI ddraw2_DuplicateSurface (IDirectDraw2 *iface, IDirectDrawSurface *src, IDirectDrawSurface **dst)
 
static HRESULT WINAPI ddraw1_DuplicateSurface (IDirectDraw *iface, IDirectDrawSurface *src, IDirectDrawSurface **dst)
 
static HRESULT WINAPI d3d7_EnumDevices (IDirect3D7 *iface, LPD3DENUMDEVICESCALLBACK7 callback, void *context)
 
static HRESULT WINAPI d3d3_EnumDevices (IDirect3D3 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context)
 
static HRESULT WINAPI d3d2_EnumDevices (IDirect3D2 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context)
 
static HRESULT WINAPI d3d1_EnumDevices (IDirect3D *iface, LPD3DENUMDEVICESCALLBACK callback, void *context)
 
static HRESULT WINAPI d3d3_CreateLight (IDirect3D3 *iface, IDirect3DLight **light, IUnknown *outer_unknown)
 
static HRESULT WINAPI d3d2_CreateLight (IDirect3D2 *iface, IDirect3DLight **light, IUnknown *outer_unknown)
 
static HRESULT WINAPI d3d1_CreateLight (IDirect3D *iface, IDirect3DLight **light, IUnknown *outer_unknown)
 
static HRESULT WINAPI d3d3_CreateMaterial (IDirect3D3 *iface, IDirect3DMaterial3 **material, IUnknown *outer_unknown)
 
static HRESULT WINAPI d3d2_CreateMaterial (IDirect3D2 *iface, IDirect3DMaterial2 **material, IUnknown *outer_unknown)
 
static HRESULT WINAPI d3d1_CreateMaterial (IDirect3D *iface, IDirect3DMaterial **material, IUnknown *outer_unknown)
 
static HRESULT WINAPI d3d3_CreateViewport (IDirect3D3 *iface, IDirect3DViewport3 **viewport, IUnknown *outer_unknown)
 
static HRESULT WINAPI d3d2_CreateViewport (IDirect3D2 *iface, IDirect3DViewport2 **viewport, IUnknown *outer_unknown)
 
static HRESULT WINAPI d3d1_CreateViewport (IDirect3D *iface, IDirect3DViewport **viewport, IUnknown *outer_unknown)
 
static HRESULT WINAPI d3d3_FindDevice (IDirect3D3 *iface, D3DFINDDEVICESEARCH *fds, D3DFINDDEVICERESULT *fdr)
 
static HRESULT WINAPI d3d2_FindDevice (IDirect3D2 *iface, D3DFINDDEVICESEARCH *fds, D3DFINDDEVICERESULT *fdr)
 
static HRESULT WINAPI d3d1_FindDevice (IDirect3D *iface, D3DFINDDEVICESEARCH *fds, D3DFINDDEVICERESULT *fdr)
 
static HRESULT WINAPI d3d7_CreateDevice (IDirect3D7 *iface, REFCLSID riid, IDirectDrawSurface7 *surface, IDirect3DDevice7 **device)
 
static HRESULT WINAPI d3d3_CreateDevice (IDirect3D3 *iface, REFCLSID riid, IDirectDrawSurface4 *surface, IDirect3DDevice3 **device, IUnknown *outer_unknown)
 
static HRESULT WINAPI d3d2_CreateDevice (IDirect3D2 *iface, REFCLSID riid, IDirectDrawSurface *surface, IDirect3DDevice2 **device)
 
static HRESULT WINAPI d3d7_CreateVertexBuffer (IDirect3D7 *iface, D3DVERTEXBUFFERDESC *desc, IDirect3DVertexBuffer7 **vertex_buffer, DWORD flags)
 
static HRESULT WINAPI d3d3_CreateVertexBuffer (IDirect3D3 *iface, D3DVERTEXBUFFERDESC *desc, IDirect3DVertexBuffer **vertex_buffer, DWORD flags, IUnknown *outer_unknown)
 
static HRESULT WINAPI d3d7_EnumZBufferFormats (IDirect3D7 *iface, REFCLSID device_iid, LPD3DENUMPIXELFORMATSCALLBACK callback, void *context)
 
static HRESULT WINAPI d3d3_EnumZBufferFormats (IDirect3D3 *iface, REFCLSID device_iid, LPD3DENUMPIXELFORMATSCALLBACK callback, void *context)
 
static HRESULT WINAPI d3d7_EvictManagedTextures (IDirect3D7 *iface)
 
static HRESULT WINAPI d3d3_EvictManagedTextures (IDirect3D3 *iface)
 
struct wined3d_vertex_declarationddraw_find_decl (struct ddraw *This, DWORD fvf)
 
static struct ddrawddraw_from_device_parent (struct wined3d_device_parent *device_parent)
 
static void CDECL device_parent_wined3d_device_created (struct wined3d_device_parent *device_parent, struct wined3d_device *device)
 
static void CDECL device_parent_mode_changed (struct wined3d_device_parent *device_parent)
 
static void CDECL device_parent_activate (struct wined3d_device_parent *device_parent, BOOL activate)
 
void ddraw_update_lost_surfaces (struct ddraw *ddraw)
 
static HRESULT CDECL device_parent_surface_created (struct wined3d_device_parent *device_parent, struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, void **parent, const struct wined3d_parent_ops **parent_ops)
 
static HRESULT CDECL device_parent_volume_created (struct wined3d_device_parent *device_parent, struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, void **parent, const struct wined3d_parent_ops **parent_ops)
 
static void STDMETHODCALLTYPE ddraw_frontbuffer_destroyed (void *parent)
 
static HRESULT CDECL device_parent_create_swapchain_texture (struct wined3d_device_parent *device_parent, void *container_parent, const struct wined3d_resource_desc *desc, DWORD texture_flags, struct wined3d_texture **texture)
 
static HRESULT CDECL device_parent_create_swapchain (struct wined3d_device_parent *device_parent, struct wined3d_swapchain_desc *desc, struct wined3d_swapchain **swapchain)
 
HRESULT ddraw_init (struct ddraw *ddraw, DWORD flags, enum wined3d_device_type device_type)
 

Variables

static const struct ddrawexclusive_ddraw
 
static HWND exclusive_window
 
static const DDDEVICEIDENTIFIER2 deviceidentifier
 
static struct enum_device_entry device_list7 []
 
const struct wined3d_parent_ops ddraw_null_wined3d_parent_ops
 
static const struct IDirectDraw7Vtbl ddraw7_vtbl
 
static const struct IDirectDraw4Vtbl ddraw4_vtbl
 
static const struct IDirectDraw2Vtbl ddraw2_vtbl
 
static struct IDirectDrawVtbl ddraw1_vtbl
 
static const struct IDirect3D7Vtbl d3d7_vtbl
 
static const struct IDirect3D3Vtbl d3d3_vtbl
 
static const struct IDirect3D2Vtbl d3d2_vtbl
 
static const struct IDirect3DVtbl d3d1_vtbl
 
static const struct wined3d_parent_ops ddraw_frontbuffer_parent_ops
 
static const struct wined3d_device_parent_ops ddraw_wined3d_device_parent_ops
 

Macro Definition Documentation

◆ CMP

#define CMP (   FLAG,
  FIELD 
)
Value:
{ DDSD_##FLAG, offsetof(DDSURFACEDESC2, FIELD), \
sizeof(((DDSURFACEDESC2 *)(NULL))->FIELD) }
smooth NULL
Definition: ftsmooth.c:416
#define offsetof(TYPE, MEMBER)
Definition: inflate.c:14

Function Documentation

◆ d3d1_AddRef()

static ULONG WINAPI d3d1_AddRef ( IDirect3D *  iface)
static

Definition at line 359 of file ddraw.c.

360 {
361  struct ddraw *This = impl_from_IDirect3D(iface);
362 
363  TRACE("iface %p.\n", iface);
364 
365  return ddraw1_AddRef(&This->IDirectDraw_iface);
366 }
static struct ddraw * impl_from_IDirect3D(IDirect3D *iface)
Definition: ddraw.c:108
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG WINAPI ddraw1_AddRef(IDirectDraw *iface)
Definition: ddraw.c:320

◆ d3d1_CreateLight()

static HRESULT WINAPI d3d1_CreateLight ( IDirect3D *  iface,
IDirect3DLight **  light,
IUnknown outer_unknown 
)
static

Definition at line 3955 of file ddraw.c.

3956 {
3957  struct ddraw *ddraw = impl_from_IDirect3D(iface);
3958 
3959  TRACE("iface %p, light %p, outer_unknown %p.\n", iface, light, outer_unknown);
3960 
3961  return d3d3_CreateLight(&ddraw->IDirect3D3_iface, light, outer_unknown);
3962 }
static struct ddraw * impl_from_IDirect3D(IDirect3D *iface)
Definition: ddraw.c:108
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum light
Definition: glfuncs.h:170
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI d3d3_CreateLight(IDirect3D3 *iface, IDirect3DLight **light, IUnknown *outer_unknown)
Definition: ddraw.c:3921
IDirect3D3 IDirect3D3_iface
Definition: ddraw_private.h:84

◆ d3d1_CreateMaterial()

static HRESULT WINAPI d3d1_CreateMaterial ( IDirect3D *  iface,
IDirect3DMaterial **  material,
IUnknown outer_unknown 
)
static

Definition at line 4028 of file ddraw.c.

4030 {
4031  struct ddraw *ddraw = impl_from_IDirect3D(iface);
4032  struct d3d_material *object;
4033 
4034  TRACE("iface %p, material %p, outer_unknown %p.\n", iface, material, outer_unknown);
4035 
4036  object = d3d_material_create(ddraw);
4037  if (!object)
4038  {
4039  ERR("Failed to allocate material memory.\n");
4040  return DDERR_OUTOFMEMORY;
4041  }
4042 
4043  TRACE("Created material %p.\n", object);
4044  *material = &object->IDirect3DMaterial_iface;
4045 
4046  return D3D_OK;
4047 }
static struct ddraw * impl_from_IDirect3D(IDirect3D *iface)
Definition: ddraw.c:108
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:109
#define D3D_OK
Definition: d3d.h:106
void * object
Definition: jmemsys.h:48
struct d3d_material * d3d_material_create(struct ddraw *ddraw) DECLSPEC_HIDDEN
Definition: material.c:501

◆ d3d1_CreateViewport()

static HRESULT WINAPI d3d1_CreateViewport ( IDirect3D *  iface,
IDirect3DViewport **  viewport,
IUnknown outer_unknown 
)
static

Definition at line 4103 of file ddraw.c.

4104 {
4105  struct ddraw *ddraw = impl_from_IDirect3D(iface);
4106 
4107  TRACE("iface %p, viewport %p, outer_unknown %p.\n", iface, viewport, outer_unknown);
4108 
4109  return d3d3_CreateViewport(&ddraw->IDirect3D3_iface, (IDirect3DViewport3 **)viewport,
4110  outer_unknown);
4111 }
static HRESULT WINAPI d3d3_CreateViewport(IDirect3D3 *iface, IDirect3DViewport3 **viewport, IUnknown *outer_unknown)
Definition: ddraw.c:4069
static struct ddraw * impl_from_IDirect3D(IDirect3D *iface)
Definition: ddraw.c:108
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3D3 IDirect3D3_iface
Definition: ddraw_private.h:84

◆ d3d1_EnumDevices()

static HRESULT WINAPI d3d1_EnumDevices ( IDirect3D *  iface,
LPD3DENUMDEVICESCALLBACK  callback,
void context 
)
static

Definition at line 3891 of file ddraw.c.

3892 {
3893  struct ddraw *ddraw = impl_from_IDirect3D(iface);
3894 
3895  TRACE("iface %p, callback %p, context %p.\n", iface, callback, context);
3896 
3898 }
Definition: http.c:6587
static struct ddraw * impl_from_IDirect3D(IDirect3D *iface)
Definition: ddraw.c:108
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3D3 IDirect3D3_iface
Definition: ddraw_private.h:84
static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context)
Definition: ddraw.c:3777

◆ d3d1_FindDevice()

static HRESULT WINAPI d3d1_FindDevice ( IDirect3D *  iface,
D3DFINDDEVICESEARCH fds,
D3DFINDDEVICERESULT fdr 
)
static

Definition at line 4203 of file ddraw.c.

4204 {
4205  struct ddraw *ddraw = impl_from_IDirect3D(iface);
4206 
4207  TRACE("iface %p, fds %p, fdr %p.\n", iface, fds, fdr);
4208 
4209  return d3d3_FindDevice(&ddraw->IDirect3D3_iface, fds, fdr);
4210 }
static struct ddraw * impl_from_IDirect3D(IDirect3D *iface)
Definition: ddraw.c:108
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3D3 IDirect3D3_iface
Definition: ddraw_private.h:84
static HRESULT WINAPI d3d3_FindDevice(IDirect3D3 *iface, D3DFINDDEVICESEARCH *fds, D3DFINDDEVICERESULT *fdr)
Definition: ddraw.c:4129

◆ d3d1_Initialize()

static HRESULT WINAPI d3d1_Initialize ( IDirect3D *  iface,
REFIID  riid 
)
static

Definition at line 2073 of file ddraw.c.

2074 {
2075  TRACE("iface %p, riid %s.\n", iface, debugstr_guid(riid));
2076 
2077  return DDERR_ALREADYINITIALIZED;
2078 }
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define DDERR_ALREADYINITIALIZED
Definition: ddraw.h:67
#define TRACE(s)
Definition: solgame.cpp:4

◆ d3d1_QueryInterface()

static HRESULT WINAPI d3d1_QueryInterface ( IDirect3D *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 257 of file ddraw.c.

258 {
259  struct ddraw *ddraw = impl_from_IDirect3D(iface);
260 
261  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
262 
264 }
REFIID riid
Definition: precomp.h:44
static struct ddraw * impl_from_IDirect3D(IDirect3D *iface)
Definition: ddraw.c:108
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID riid, void **out)
Definition: ddraw.c:128
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ d3d1_Release()

static ULONG WINAPI d3d1_Release ( IDirect3D *  iface)
static

Definition at line 538 of file ddraw.c.

539 {
540  struct ddraw *This = impl_from_IDirect3D(iface);
541 
542  TRACE("iface %p.\n", iface);
543 
544  return ddraw1_Release(&This->IDirectDraw_iface);
545 }
static struct ddraw * impl_from_IDirect3D(IDirect3D *iface)
Definition: ddraw.c:108
static ULONG WINAPI ddraw1_Release(IDirectDraw *iface)
Definition: ddraw.c:498
#define TRACE(s)
Definition: solgame.cpp:4

◆ d3d2_AddRef()

static ULONG WINAPI d3d2_AddRef ( IDirect3D2 *  iface)
static

Definition at line 350 of file ddraw.c.

351 {
352  struct ddraw *This = impl_from_IDirect3D2(iface);
353 
354  TRACE("iface %p.\n", iface);
355 
356  return ddraw1_AddRef(&This->IDirectDraw_iface);
357 }
static struct ddraw * impl_from_IDirect3D2(IDirect3D2 *iface)
Definition: ddraw.c:113
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG WINAPI ddraw1_AddRef(IDirectDraw *iface)
Definition: ddraw.c:320

◆ d3d2_CreateDevice()

static HRESULT WINAPI d3d2_CreateDevice ( IDirect3D2 *  iface,
REFCLSID  riid,
IDirectDrawSurface *  surface,
IDirect3DDevice2 **  device 
)
static

Definition at line 4287 of file ddraw.c.

4289 {
4290  struct ddraw_surface *surface_impl = unsafe_impl_from_IDirectDrawSurface(surface);
4291  struct ddraw *ddraw = impl_from_IDirect3D2(iface);
4292  struct d3d_device *device_impl;
4293  HRESULT hr;
4294 
4295  TRACE("iface %p, riid %s, surface %p, device %p.\n",
4296  iface, debugstr_guid(riid), surface, device);
4297 
4299  if (SUCCEEDED(hr = d3d_device_create(ddraw, riid, surface_impl, (IUnknown *)surface, 2, &device_impl, NULL)))
4300  {
4301  *device = &device_impl->IDirect3DDevice2_iface;
4302  }
4303  else
4304  {
4305  WARN("Failed to create device, hr %#x.\n", hr);
4306  *device = NULL;
4307  }
4309 
4310  return hr;
4311 }
static struct ddraw * impl_from_IDirect3D2(IDirect3D2 *iface)
Definition: ddraw.c:113
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface) DECLSPEC_HIDDEN
Definition: surface.c:5705
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
Definition: devices.h:37
smooth NULL
Definition: ftsmooth.c:416
HRESULT d3d_device_create(struct ddraw *ddraw, const GUID *guid, struct ddraw_surface *target, IUnknown *rt_iface, UINT version, struct d3d_device **device, IUnknown *outer_unknown) DECLSPEC_HIDDEN
Definition: device.c:6980
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
IDirect3DDevice2 IDirect3DDevice2_iface
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ d3d2_CreateLight()

static HRESULT WINAPI d3d2_CreateLight ( IDirect3D2 *  iface,
IDirect3DLight **  light,
IUnknown outer_unknown 
)
static

Definition at line 3946 of file ddraw.c.

3947 {
3948  struct ddraw *ddraw = impl_from_IDirect3D2(iface);
3949 
3950  TRACE("iface %p, light %p, outer_unknown %p.\n", iface, light, outer_unknown);
3951 
3952  return d3d3_CreateLight(&ddraw->IDirect3D3_iface, light, outer_unknown);
3953 }
static struct ddraw * impl_from_IDirect3D2(IDirect3D2 *iface)
Definition: ddraw.c:113
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum light
Definition: glfuncs.h:170
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI d3d3_CreateLight(IDirect3D3 *iface, IDirect3DLight **light, IUnknown *outer_unknown)
Definition: ddraw.c:3921
IDirect3D3 IDirect3D3_iface
Definition: ddraw_private.h:84

◆ d3d2_CreateMaterial()

static HRESULT WINAPI d3d2_CreateMaterial ( IDirect3D2 *  iface,
IDirect3DMaterial2 **  material,
IUnknown outer_unknown 
)
static

Definition at line 4007 of file ddraw.c.

4009 {
4010  struct ddraw *ddraw = impl_from_IDirect3D2(iface);
4011  struct d3d_material *object;
4012 
4013  TRACE("iface %p, material %p, outer_unknown %p.\n", iface, material, outer_unknown);
4014 
4015  object = d3d_material_create(ddraw);
4016  if (!object)
4017  {
4018  ERR("Failed to allocate material memory.\n");
4019  return DDERR_OUTOFMEMORY;
4020  }
4021 
4022  TRACE("Created material %p.\n", object);
4023  *material = &object->IDirect3DMaterial2_iface;
4024 
4025  return D3D_OK;
4026 }
static struct ddraw * impl_from_IDirect3D2(IDirect3D2 *iface)
Definition: ddraw.c:113
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:109
#define D3D_OK
Definition: d3d.h:106
void * object
Definition: jmemsys.h:48
struct d3d_material * d3d_material_create(struct ddraw *ddraw) DECLSPEC_HIDDEN
Definition: material.c:501

◆ d3d2_CreateViewport()

static HRESULT WINAPI d3d2_CreateViewport ( IDirect3D2 *  iface,
IDirect3DViewport2 **  viewport,
IUnknown outer_unknown 
)
static

Definition at line 4093 of file ddraw.c.

4094 {
4095  struct ddraw *ddraw = impl_from_IDirect3D2(iface);
4096 
4097  TRACE("iface %p, viewport %p, outer_unknown %p.\n", iface, viewport, outer_unknown);
4098 
4099  return d3d3_CreateViewport(&ddraw->IDirect3D3_iface, (IDirect3DViewport3 **)viewport,
4100  outer_unknown);
4101 }
static struct ddraw * impl_from_IDirect3D2(IDirect3D2 *iface)
Definition: ddraw.c:113
static HRESULT WINAPI d3d3_CreateViewport(IDirect3D3 *iface, IDirect3DViewport3 **viewport, IUnknown *outer_unknown)
Definition: ddraw.c:4069
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3D3 IDirect3D3_iface
Definition: ddraw_private.h:84

◆ d3d2_EnumDevices()

static HRESULT WINAPI d3d2_EnumDevices ( IDirect3D2 *  iface,
LPD3DENUMDEVICESCALLBACK  callback,
void context 
)
static

Definition at line 3882 of file ddraw.c.

3883 {
3884  struct ddraw *ddraw = impl_from_IDirect3D2(iface);
3885 
3886  TRACE("iface %p, callback %p, context %p.\n", iface, callback, context);
3887 
3889 }
static struct ddraw * impl_from_IDirect3D2(IDirect3D2 *iface)
Definition: ddraw.c:113
Definition: http.c:6587
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3D3 IDirect3D3_iface
Definition: ddraw_private.h:84
static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context)
Definition: ddraw.c:3777

◆ d3d2_FindDevice()

static HRESULT WINAPI d3d2_FindDevice ( IDirect3D2 *  iface,
D3DFINDDEVICESEARCH fds,
D3DFINDDEVICERESULT fdr 
)
static

Definition at line 4194 of file ddraw.c.

4195 {
4196  struct ddraw *ddraw = impl_from_IDirect3D2(iface);
4197 
4198  TRACE("iface %p, fds %p, fdr %p.\n", iface, fds, fdr);
4199 
4200  return d3d3_FindDevice(&ddraw->IDirect3D3_iface, fds, fdr);
4201 }
static struct ddraw * impl_from_IDirect3D2(IDirect3D2 *iface)
Definition: ddraw.c:113
#define TRACE(s)
Definition: solgame.cpp:4
IDirect3D3 IDirect3D3_iface
Definition: ddraw_private.h:84
static HRESULT WINAPI d3d3_FindDevice(IDirect3D3 *iface, D3DFINDDEVICESEARCH *fds, D3DFINDDEVICERESULT *fdr)
Definition: ddraw.c:4129

◆ d3d2_QueryInterface()

static HRESULT WINAPI d3d2_QueryInterface ( IDirect3D2 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 248 of file ddraw.c.

249 {
250  struct ddraw *ddraw = impl_from_IDirect3D2(iface);
251 
252  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
253 
255 }
static struct ddraw * impl_from_IDirect3D2(IDirect3D2 *iface)
Definition: ddraw.c:113
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID riid, void **out)
Definition: ddraw.c:128
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ d3d2_Release()

static ULONG WINAPI d3d2_Release ( IDirect3D2 *  iface)
static

Definition at line 529 of file ddraw.c.

530 {
531  struct ddraw *This = impl_from_IDirect3D2(iface);
532 
533  TRACE("iface %p.\n", iface);
534 
535  return ddraw1_Release(&This->IDirectDraw_iface);
536 }
static struct ddraw * impl_from_IDirect3D2(IDirect3D2 *iface)
Definition: ddraw.c:113
static ULONG WINAPI ddraw1_Release(IDirectDraw *iface)
Definition: ddraw.c:498
#define TRACE(s)
Definition: solgame.cpp:4

◆ d3d3_AddRef()

static ULONG WINAPI d3d3_AddRef ( IDirect3D3 *  iface)
static

Definition at line 341 of file ddraw.c.

342 {
343  struct ddraw *This = impl_from_IDirect3D3(iface);
344 
345  TRACE("iface %p.\n", iface);
346 
347  return ddraw1_AddRef(&This->IDirectDraw_iface);
348 }
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG WINAPI ddraw1_AddRef(IDirectDraw *iface)
Definition: ddraw.c:320
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

◆ d3d3_CreateDevice()

static HRESULT WINAPI d3d3_CreateDevice ( IDirect3D3 *  iface,
REFCLSID  riid,
IDirectDrawSurface4 *  surface,
IDirect3DDevice3 **  device,
IUnknown outer_unknown 
)
static

Definition at line 4258 of file ddraw.c.

4260 {
4261  struct ddraw_surface *surface_impl = unsafe_impl_from_IDirectDrawSurface4(surface);
4262  struct ddraw *ddraw = impl_from_IDirect3D3(iface);
4263  struct d3d_device *device_impl;
4264  HRESULT hr;
4265 
4266  TRACE("iface %p, riid %s, surface %p, device %p, outer_unknown %p.\n",
4267  iface, debugstr_guid(riid), surface, device, outer_unknown);
4268 
4269  if (outer_unknown)
4270  return CLASS_E_NOAGGREGATION;
4271 
4273  if (SUCCEEDED(hr = d3d_device_create(ddraw, riid, surface_impl, (IUnknown *)surface, 3, &device_impl, NULL)))
4274  {
4275  *device = &device_impl->IDirect3DDevice3_iface;
4276  }
4277  else
4278  {
4279  WARN("Failed to create device, hr %#x.\n", hr);
4280  *device = NULL;
4281  }
4283 
4284  return hr;
4285 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface4(IDirectDrawSurface4 *iface) DECLSPEC_HIDDEN
Definition: surface.c:5657
Definition: devices.h:37
smooth NULL
Definition: ftsmooth.c:416
IDirect3DDevice3 IDirect3DDevice3_iface
HRESULT d3d_device_create(struct ddraw *ddraw, const GUID *guid, struct ddraw_surface *target, IUnknown *rt_iface, UINT version, struct d3d_device **device, IUnknown *outer_unknown) DECLSPEC_HIDDEN
Definition: device.c:6980
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
IUnknown * outer_unknown
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

◆ d3d3_CreateLight()

static HRESULT WINAPI d3d3_CreateLight ( IDirect3D3 *  iface,
IDirect3DLight **  light,
IUnknown outer_unknown 
)
static

Definition at line 3921 of file ddraw.c.

3923 {
3924  struct ddraw *ddraw = impl_from_IDirect3D3(iface);
3925  struct d3d_light *object;
3926 
3927  TRACE("iface %p, light %p, outer_unknown %p.\n", iface, light, outer_unknown);
3928 
3929  if (outer_unknown)
3930  return CLASS_E_NOAGGREGATION;
3931 
3932  if (!(object = heap_alloc_zero(sizeof(*object))))
3933  {
3934  ERR("Failed to allocate light memory.\n");
3935  return DDERR_OUTOFMEMORY;
3936  }
3937 
3938  d3d_light_init(object, ddraw);
3939 
3940  TRACE("Created light %p.\n", object);
3941  *light = &object->IDirect3DLight_iface;
3942 
3943  return D3D_OK;
3944 }
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum light
Definition: glfuncs.h:170
void d3d_light_init(struct d3d_light *light, struct ddraw *ddraw) DECLSPEC_HIDDEN
Definition: light.c:247
#define TRACE(s)
Definition: solgame.cpp:4
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define ERR(fmt,...)
Definition: debug.h:109
#define D3D_OK
Definition: d3d.h:106
void * object
Definition: jmemsys.h:48
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

Referenced by d3d1_CreateLight(), and d3d2_CreateLight().

◆ d3d3_CreateMaterial()

static HRESULT WINAPI d3d3_CreateMaterial ( IDirect3D3 *  iface,
IDirect3DMaterial3 **  material,
IUnknown outer_unknown 
)
static

Definition at line 3984 of file ddraw.c.

3986 {
3987  struct ddraw *ddraw = impl_from_IDirect3D3(iface);
3988  struct d3d_material *object;
3989 
3990  TRACE("iface %p, material %p, outer_unknown %p.\n", iface, material, outer_unknown);
3991 
3992  if (outer_unknown) return CLASS_E_NOAGGREGATION;
3993 
3994  object = d3d_material_create(ddraw);
3995  if (!object)
3996  {
3997  ERR("Failed to allocate material memory.\n");
3998  return DDERR_OUTOFMEMORY;
3999  }
4000 
4001  TRACE("Created material %p.\n", object);
4002  *material = &object->IDirect3DMaterial3_iface;
4003 
4004  return D3D_OK;
4005 }
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
#define TRACE(s)
Definition: solgame.cpp:4
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define ERR(fmt,...)
Definition: debug.h:109
#define D3D_OK
Definition: d3d.h:106
void * object
Definition: jmemsys.h:48
struct d3d_material * d3d_material_create(struct ddraw *ddraw) DECLSPEC_HIDDEN
Definition: material.c:501
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

◆ d3d3_CreateVertexBuffer()

static HRESULT WINAPI d3d3_CreateVertexBuffer ( IDirect3D3 *  iface,
D3DVERTEXBUFFERDESC desc,
IDirect3DVertexBuffer **  vertex_buffer,
DWORD  flags,
IUnknown outer_unknown 
)
static

Definition at line 4356 of file ddraw.c.

4358 {
4359  struct ddraw *ddraw = impl_from_IDirect3D3(iface);
4360  struct d3d_vertex_buffer *object;
4361  HRESULT hr;
4362 
4363  TRACE("iface %p, desc %p, vertex_buffer %p, flags %#x, outer_unknown %p.\n",
4364  iface, desc, vertex_buffer, flags, outer_unknown);
4365 
4366  if (outer_unknown)
4367  return CLASS_E_NOAGGREGATION;
4368  if (!vertex_buffer || !desc)
4369  return DDERR_INVALIDPARAMS;
4370 
4371  hr = d3d_vertex_buffer_create(&object, ddraw, desc);
4372  if (hr == D3D_OK)
4373  {
4374  TRACE("Created vertex buffer %p.\n", object);
4375  *vertex_buffer = (IDirect3DVertexBuffer *)&object->IDirect3DVertexBuffer7_iface;
4376  }
4377  else
4378  WARN("Failed to create vertex buffer, hr %#x.\n", hr);
4379 
4380  return hr;
4381 }
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:111
static const WCHAR desc[]
Definition: protectdata.c:36
HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **buffer, struct ddraw *ddraw, D3DVERTEXBUFFERDESC *desc) DECLSPEC_HIDDEN
Definition: vertexbuffer.c:432
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
GLbitfield flags
Definition: glext.h:7161
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define D3D_OK
Definition: d3d.h:106
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
void * object
Definition: jmemsys.h:48
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

◆ d3d3_CreateViewport()

static HRESULT WINAPI d3d3_CreateViewport ( IDirect3D3 *  iface,
IDirect3DViewport3 **  viewport,
IUnknown outer_unknown 
)
static

Definition at line 4069 of file ddraw.c.

4071 {
4072  struct ddraw *ddraw = impl_from_IDirect3D3(iface);
4073  struct d3d_viewport *object;
4074 
4075  TRACE("iface %p, viewport %p, outer_unknown %p.\n", iface, viewport, outer_unknown);
4076 
4077  if (outer_unknown) return CLASS_E_NOAGGREGATION;
4078 
4079  if (!(object = heap_alloc_zero(sizeof(*object))))
4080  {
4081  ERR("Failed to allocate viewport memory.\n");
4082  return DDERR_OUTOFMEMORY;
4083  }
4084 
4085  d3d_viewport_init(object, ddraw);
4086 
4087  TRACE("Created viewport %p.\n", object);
4088  *viewport = &object->IDirect3DViewport3_iface;
4089 
4090  return D3D_OK;
4091 }
void d3d_viewport_init(struct d3d_viewport *viewport, struct ddraw *ddraw) DECLSPEC_HIDDEN
Definition: viewport.c:1146
#define DDERR_OUTOFMEMORY
Definition: ddraw.h:111
#define TRACE(s)
Definition: solgame.cpp:4
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define ERR(fmt,...)
Definition: debug.h:109
#define D3D_OK
Definition: d3d.h:106
void * object
Definition: jmemsys.h:48
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

Referenced by d3d1_CreateViewport(), and d3d2_CreateViewport().

◆ d3d3_EnumDevices()

static HRESULT WINAPI d3d3_EnumDevices ( IDirect3D3 *  iface,
LPD3DENUMDEVICESCALLBACK  callback,
void context 
)
static

Definition at line 3777 of file ddraw.c.

3778 {
3779  static CHAR wined3d_description[] = "Wine D3DDevice using WineD3D and OpenGL";
3780 
3781  struct ddraw *ddraw = impl_from_IDirect3D3(iface);
3782  D3DDEVICEDESC device_desc1, hal_desc, hel_desc;
3783  D3DDEVICEDESC7 device_desc7;
3784  HRESULT hr;
3785 
3786  /* Some games (Motoracer 2 demo) have the bad idea to modify the device
3787  * name string. Let's put the string in a sufficiently sized array in
3788  * writable memory. */
3789  char device_name[50];
3790  strcpy(device_name,"Direct3D HEL");
3791 
3792  TRACE("iface %p, callback %p, context %p.\n", iface, callback, context);
3793 
3794  if (!callback)
3795  return DDERR_INVALIDPARAMS;
3796 
3798 
3799  if (FAILED(hr = ddraw_get_d3dcaps(ddraw, &device_desc7)))
3800  {
3802  return hr;
3803  }
3804  ddraw_d3dcaps1_from_7(&device_desc1, &device_desc7);
3805 
3806  /* Do I have to enumerate the reference id? Note from old d3d7:
3807  * "It seems that enumerating the reference IID on Direct3D 1 games
3808  * (AvP / Motoracer2) breaks them". So do not enumerate this iid in V1
3809  *
3810  * There's a registry key HKLM\Software\Microsoft\Direct3D\Drivers,
3811  * EnumReference which enables / disables enumerating the reference
3812  * rasterizer. It's a DWORD, 0 means disabled, 2 means enabled. The
3813  * enablerefrast.reg and disablerefrast.reg files in the DirectX 7.0 sdk
3814  * demo directory suggest this.
3815  *
3816  * Some games(GTA 2) seem to use the second enumerated device, so I have
3817  * to enumerate at least 2 devices. So enumerate the reference device to
3818  * have 2 devices.
3819  *
3820  * Other games (Rollcage) tell emulation and hal device apart by certain
3821  * flags. Rollcage expects D3DPTEXTURECAPS_POW2 to be set (yeah, it is a
3822  * limitation flag), and it refuses all devices that have the perspective
3823  * flag set. This way it refuses the emulation device, and HAL devices
3824  * never have POW2 unset in d3d7 on windows. */
3825  if (ddraw->d3dversion != 1)
3826  {
3827  static CHAR reference_description[] = "RGB Direct3D emulation";
3828 
3829  TRACE("Enumerating WineD3D D3DDevice interface.\n");
3830  hal_desc = device_desc1;
3831  hel_desc = device_desc1;
3832  /* The rgb device has the pow2 flag set in the hel caps, but not in the hal caps. */
3837  /* RGB, RAMP and MMX devices have a HAL dcmColorModel of 0 */
3838  hal_desc.dcmColorModel = 0;
3839  /* RGB, RAMP and MMX devices cannot report HAL hardware flags */
3840  hal_desc.dwFlags = 0;
3841 
3842  hr = callback((GUID *)&IID_IDirect3DRGBDevice, reference_description,
3843  device_name, &hal_desc, &hel_desc, context);
3844  if (hr != D3DENUMRET_OK)
3845  {
3846  TRACE("Application cancelled the enumeration.\n");
3848  return D3D_OK;
3849  }
3850  }
3851 
3852  strcpy(device_name,"Direct3D HAL");
3853 
3854  TRACE("Enumerating HAL Direct3D device.\n");
3855  hal_desc = device_desc1;
3856  hel_desc = device_desc1;
3857 
3858  /* The hal device does not have the pow2 flag set in hel, but in hal. */
3863  /* HAL devices have a HEL dcmColorModel of 0 */
3864  hel_desc.dcmColorModel = 0;
3865 
3866  hr = callback((GUID *)&IID_IDirect3DHALDevice, wined3d_description,
3867  device_name, &hal_desc, &hel_desc, context);
3868  if (hr != D3DENUMRET_OK)
3869  {
3870  TRACE("Application cancelled the enumeration.\n");
3872  return D3D_OK;
3873  }
3874 
3875  TRACE("End of enumeration.\n");
3876 
3878 
3879  return D3D_OK;
3880 }
#define D3DPTEXTURECAPS_POW2
Definition: d3d8caps.h:114
HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
Definition: ddraw.c:1248
HRESULT hr
Definition: shlfolder.c:183
Definition: http.c:6587
DWORD dwFlags
Definition: d3dcaps.h:319
char CHAR
Definition: xmlstorage.h:175
static const WCHAR device_name[]
Definition: btrfs.c:61
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define D3DPTEXTURECAPS_PERSPECTIVE
Definition: d3d8caps.h:113
int d3dversion
D3DCOLORMODEL dcmColorModel
Definition: d3dcaps.h:320
D3DPRIMCAPS dpcTriCaps
Definition: d3dcaps.h:326
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL
Definition: d3d8caps.h:119
#define D3DENUMRET_OK
Definition: d3dtypes.h:81
DWORD dwTextureCaps
Definition: d3dcaps.h:272
#define D3D_OK
Definition: d3d.h:106
D3DPRIMCAPS dpcLineCaps
Definition: d3dcaps.h:325
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
void ddraw_d3dcaps1_from_7(D3DDEVICEDESC *caps1, D3DDEVICEDESC7 *caps7)
Definition: ddraw.c:1192
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

Referenced by d3d1_EnumDevices(), and d3d2_EnumDevices().

◆ d3d3_EnumZBufferFormats()

static HRESULT WINAPI d3d3_EnumZBufferFormats ( IDirect3D3 *  iface,
REFCLSID  device_iid,
LPD3DENUMPIXELFORMATSCALLBACK  callback,
void context 
)
static

Definition at line 4514 of file ddraw.c.

4516 {
4517  struct ddraw *ddraw = impl_from_IDirect3D3(iface);
4518 
4519  TRACE("iface %p, device_iid %s, callback %p, context %p.\n",
4520  iface, debugstr_guid(device_iid), callback, context);
4521 
4523 }
Definition: http.c:6587
IDirect3D7 IDirect3D7_iface
Definition: ddraw_private.h:83
#define debugstr_guid
Definition: kernel32.h:35
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device_iid, LPD3DENUMPIXELFORMATSCALLBACK callback, void *context)
Definition: ddraw.c:4400
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

◆ d3d3_EvictManagedTextures()

static HRESULT WINAPI d3d3_EvictManagedTextures ( IDirect3D3 *  iface)
static

Definition at line 4551 of file ddraw.c.

4552 {
4553  struct ddraw *ddraw = impl_from_IDirect3D3(iface);
4554 
4555  TRACE("iface %p.\n", iface);
4556 
4558 }
IDirect3D7 IDirect3D7_iface
Definition: ddraw_private.h:83
static HRESULT WINAPI d3d7_EvictManagedTextures(IDirect3D7 *iface)
Definition: ddraw.c:4537
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

◆ d3d3_FindDevice()

static HRESULT WINAPI d3d3_FindDevice ( IDirect3D3 *  iface,
D3DFINDDEVICESEARCH fds,
D3DFINDDEVICERESULT fdr 
)
static

Definition at line 4129 of file ddraw.c.

4130 {
4131  struct ddraw *ddraw = impl_from_IDirect3D3(iface);
4132  D3DDEVICEDESC7 desc7;
4133  D3DDEVICEDESC desc1;
4134  HRESULT hr;
4135 
4136  TRACE("iface %p, fds %p, fdr %p.\n", iface, fds, fdr);
4137 
4138  if (!fds || !fdr) return DDERR_INVALIDPARAMS;
4139 
4140  if (fds->dwSize != sizeof(D3DFINDDEVICESEARCH) || (fdr->dwSize != sizeof(D3DFINDDEVICERESULT1) &&
4141  fdr->dwSize != sizeof(D3DFINDDEVICERESULT2) && fdr->dwSize != sizeof(D3DFINDDEVICERESULT)))
4142  return DDERR_INVALIDPARAMS;
4143 
4144  if ((fds->dwFlags & D3DFDS_COLORMODEL)
4145  && fds->dcmColorModel != D3DCOLOR_RGB)
4146  {
4147  WARN("Trying to request a non-RGB D3D color model. Not supported.\n");
4148  return DDERR_INVALIDPARAMS; /* No real idea what to return here :-) */
4149  }
4150 
4151  if (fds->dwFlags & D3DFDS_GUID)
4152  {
4153  TRACE("Trying to match guid %s.\n", debugstr_guid(&(fds->guid)));
4154  if (!IsEqualGUID(&IID_D3DDEVICE_WineD3D, &fds->guid)
4155  && !IsEqualGUID(&IID_IDirect3DHALDevice, &fds->guid)
4156  && !IsEqualGUID(&IID_IDirect3DRGBDevice, &fds->guid))
4157  {
4158  WARN("No match for this GUID.\n");
4159  return DDERR_NOTFOUND;
4160  }
4161  }
4162 
4163  /* Get the caps */
4164  if (FAILED(hr = ddraw_get_d3dcaps(ddraw, &desc7)))
4165  return hr;
4166 
4167  /* Now return our own GUID */
4168  ddraw_d3dcaps1_from_7(&desc1, &desc7);
4169  fdr->guid = IID_D3DDEVICE_WineD3D;
4170 
4171  if (fdr->dwSize == sizeof(D3DFINDDEVICERESULT1))
4172  {
4174  memcpy(&fdr1->ddHwDesc, &desc1, sizeof(fdr1->ddHwDesc));
4175  memcpy(&fdr1->ddSwDesc, &desc1, sizeof(fdr1->ddSwDesc));
4176  }
4177  else if (fdr->dwSize == sizeof(D3DFINDDEVICERESULT2))
4178  {
4180  memcpy(&fdr2->ddHwDesc, &desc1, sizeof(fdr2->ddHwDesc));
4181  memcpy(&fdr2->ddSwDesc, &desc1, sizeof(fdr2->ddSwDesc));
4182  }
4183  else
4184  {
4185  fdr->ddHwDesc = desc1;
4186  fdr->ddSwDesc = desc1;
4187  }
4188 
4189  TRACE("Returning Wine's wined3d device with (undumped) capabilities.\n");
4190 
4191  return D3D_OK;
4192 }
HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
Definition: ddraw.c:1248
HRESULT hr
Definition: shlfolder.c:183
D3DCOLORMODEL dcmColorModel
Definition: d3dcaps.h:398
#define WARN(fmt,...)
Definition: debug.h:111
const GUID IID_D3DDEVICE_WineD3D
Definition: device.c:39
#define D3DFDS_COLORMODEL
Definition: d3dcaps.h:126
D3DDEVICEDESC ddHwDesc
Definition: d3dcaps.h:422
D3DDEVICEDESC2 ddHwDesc
Definition: d3dcaps.h:414
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define DDERR_NOTFOUND
Definition: ddraw.h:97
LONG HRESULT
Definition: typedefs.h:77
D3DDEVICEDESC2 ddSwDesc
Definition: d3dcaps.h:415
D3DDEVICEDESC1 ddHwDesc
Definition: d3dcaps.h:407
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
D3DDEVICEDESC ddSwDesc
Definition: d3dcaps.h:423
#define D3DCOLOR_RGB
Definition: d3dtypes.h:627
#define D3D_OK
Definition: d3d.h:106
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define D3DFDS_GUID
Definition: d3dcaps.h:127
void ddraw_d3dcaps1_from_7(D3DDEVICEDESC *caps1, D3DDEVICEDESC7 *caps7)
Definition: ddraw.c:1192
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
D3DDEVICEDESC1 ddSwDesc
Definition: d3dcaps.h:408
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

Referenced by d3d1_FindDevice(), and d3d2_FindDevice().

◆ d3d3_QueryInterface()

static HRESULT WINAPI d3d3_QueryInterface ( IDirect3D3 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 239 of file ddraw.c.

240 {
241  struct ddraw *ddraw = impl_from_IDirect3D3(iface);
242 
243  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
244 
246 }
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID riid, void **out)
Definition: ddraw.c:128
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

◆ d3d3_Release()

static ULONG WINAPI d3d3_Release ( IDirect3D3 *  iface)
static

Definition at line 520 of file ddraw.c.

521 {
522  struct ddraw *This = impl_from_IDirect3D3(iface);
523 
524  TRACE("iface %p.\n", iface);
525 
526  return ddraw1_Release(&This->IDirectDraw_iface);
527 }
static ULONG WINAPI ddraw1_Release(IDirectDraw *iface)
Definition: ddraw.c:498
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirect3D3(IDirect3D3 *iface)
Definition: ddraw.c:118

◆ d3d7_AddRef()

static ULONG WINAPI d3d7_AddRef ( IDirect3D7 *  iface)
static

Definition at line 332 of file ddraw.c.

333 {
334  struct ddraw *This = impl_from_IDirect3D7(iface);
335 
336  TRACE("iface %p.\n", iface);
337 
338  return ddraw7_AddRef(&This->IDirectDraw7_iface);
339 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirect3D7(IDirect3D7 *iface)
Definition: ddraw.c:123
static ULONG WINAPI ddraw7_AddRef(IDirectDraw7 *iface)
Definition: ddraw.c:284

◆ d3d7_CreateDevice()

static HRESULT WINAPI d3d7_CreateDevice ( IDirect3D7 *  iface,
REFCLSID  riid,
IDirectDrawSurface7 surface,
IDirect3DDevice7 **  device 
)
static

Definition at line 4233 of file ddraw.c.

4235 {
4237  struct ddraw *ddraw = impl_from_IDirect3D7(iface);
4238  struct d3d_device *object;
4239  HRESULT hr;
4240 
4241  TRACE("iface %p, riid %s, surface %p, device %p.\n", iface, debugstr_guid(riid), surface, device);
4242 
4244  if (SUCCEEDED(hr = d3d_device_create(ddraw, riid, target, (IUnknown *)surface, 7, &object, NULL)))
4245  {
4246  *device = &object->IDirect3DDevice7_iface;
4247  }
4248  else
4249  {
4250  WARN("Failed to create device, hr %#x.\n", hr);
4251  *device = NULL;
4252  }
4254 
4255  return hr;
4256 }
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface) DECLSPEC_HIDDEN
Definition: surface.c:5641
Definition: devices.h:37
smooth NULL
Definition: ftsmooth.c:416
HRESULT d3d_device_create(struct ddraw *ddraw, const GUID *guid, struct ddraw_surface *target, IUnknown *rt_iface, UINT version, struct d3d_device **device, IUnknown *outer_unknown) DECLSPEC_HIDDEN
Definition: device.c:6980
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static struct ddraw * impl_from_IDirect3D7(IDirect3D7 *iface)
Definition: ddraw.c:123
GLenum target
Definition: glext.h:7315
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
void * object
Definition: jmemsys.h:48
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ d3d7_CreateVertexBuffer()

static HRESULT WINAPI d3d7_CreateVertexBuffer ( IDirect3D7 *  iface,
D3DVERTEXBUFFERDESC desc,
IDirect3DVertexBuffer7 **  vertex_buffer,
DWORD  flags 
)
static

Definition at line 4332 of file ddraw.c.

4334 {
4335  struct ddraw *ddraw = impl_from_IDirect3D7(iface);
4336  struct d3d_vertex_buffer *object;
4337  HRESULT hr;
4338 
4339  TRACE("iface %p, desc %p, vertex_buffer %p, flags %#x.\n",
4340  iface, desc, vertex_buffer, flags);
4341 
4342  if (!vertex_buffer || !desc) return DDERR_INVALIDPARAMS;
4343 
4344  hr = d3d_vertex_buffer_create(&object, ddraw, desc);
4345  if (hr == D3D_OK)
4346  {
4347  TRACE("Created vertex buffer %p.\n", object);
4348  *vertex_buffer = &object->IDirect3DVertexBuffer7_iface;
4349  }
4350  else
4351  WARN("Failed to create vertex buffer, hr %#x.\n", hr);
4352 
4353  return hr;
4354 }
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:111
static const WCHAR desc[]
Definition: protectdata.c:36
HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **buffer, struct ddraw *ddraw, D3DVERTEXBUFFERDESC *desc) DECLSPEC_HIDDEN
Definition: vertexbuffer.c:432
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
GLbitfield flags
Definition: glext.h:7161
static struct ddraw * impl_from_IDirect3D7(IDirect3D7 *iface)
Definition: ddraw.c:123
#define D3D_OK
Definition: d3d.h:106
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
void * object
Definition: jmemsys.h:48

◆ d3d7_EnumDevices()

static HRESULT WINAPI d3d7_EnumDevices ( IDirect3D7 *  iface,
LPD3DENUMDEVICESCALLBACK7  callback,
void context 
)
static

Definition at line 3714 of file ddraw.c.

3715 {
3716  struct ddraw *ddraw = impl_from_IDirect3D7(iface);
3717  D3DDEVICEDESC7 device_desc7;
3718  DWORD dev_caps;
3719  HRESULT hr;
3720  size_t i;
3721 
3722  TRACE("iface %p, callback %p, context %p.\n", iface, callback, context);
3723 
3724  if (!callback)
3725  return DDERR_INVALIDPARAMS;
3726 
3728 
3729  if (FAILED(hr = ddraw_get_d3dcaps(ddraw, &device_desc7)))
3730  {
3732  return hr;
3733  }
3734 
3735  dev_caps = device_desc7.dwDevCaps;
3736 
3737  for (i = 0; i < ARRAY_SIZE(device_list7); i++)
3738  {
3739  HRESULT ret;
3740 
3741  device_desc7.deviceGUID = *device_list7[i].device_guid;
3742  device_desc7.dwDevCaps = dev_caps & ~device_list7[i].remove_caps;
3743 
3744  ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context);
3745  if (ret != DDENUMRET_OK)
3746  {
3747  TRACE("Application cancelled the enumeration.\n");
3749  return D3D_OK;
3750  }
3751  }
3752 
3753  TRACE("End of enumeration.\n");
3754 
3756 
3757  return D3D_OK;
3758 }
HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
Definition: ddraw.c:1248
HRESULT hr
Definition: shlfolder.c:183
Definition: http.c:6587
static const WCHAR device_name[]
Definition: btrfs.c:61
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
GUID deviceGUID
Definition: d3dcaps.h:382
int ret
#define DDENUMRET_OK
Definition: ddraw.h:189
static struct enum_device_entry device_list7[]
static struct ddraw * impl_from_IDirect3D7(IDirect3D7 *iface)
Definition: ddraw.c:123
#define D3D_OK
Definition: d3d.h:106
#define ARRAY_SIZE(a)
Definition: main.h:24
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
DWORD dwDevCaps
Definition: d3dcaps.h:358

◆ d3d7_EnumZBufferFormats()

static HRESULT WINAPI d3d7_EnumZBufferFormats ( IDirect3D7 *  iface,
REFCLSID  device_iid,
LPD3DENUMPIXELFORMATSCALLBACK  callback,
void context 
)
static

Definition at line 4400 of file ddraw.c.

4402 {
4403  struct ddraw *ddraw = impl_from_IDirect3D7(iface);
4404  struct wined3d_display_mode mode;
4406  unsigned int i;
4407  HRESULT hr;
4408 
4409  /* Order matters. Specifically, BattleZone II (full version) expects the
4410  * 16-bit depth formats to be listed before the 24 and 32 ones. */
4411  static const enum wined3d_format_id formats[] =
4412  {
4419  };
4420 
4421  TRACE("iface %p, device_iid %s, callback %p, context %p.\n",
4422  iface, debugstr_guid(device_iid), callback, context);
4423 
4424  if (!callback) return DDERR_INVALIDPARAMS;
4425 
4426  if (IsEqualGUID(device_iid, &IID_IDirect3DHALDevice)
4427  || IsEqualGUID(device_iid, &IID_IDirect3DTnLHalDevice)
4428  || IsEqualGUID(device_iid, &IID_D3DDEVICE_WineD3D))
4429  {
4430  TRACE("Asked for HAL device.\n");
4432  }
4433  else if (IsEqualGUID(device_iid, &IID_IDirect3DRGBDevice)
4434  || IsEqualGUID(device_iid, &IID_IDirect3DMMXDevice))
4435  {
4436  TRACE("Asked for SW device.\n");
4438  }
4439  else if (IsEqualGUID(device_iid, &IID_IDirect3DRefDevice))
4440  {
4441  TRACE("Asked for REF device.\n");
4443  }
4444  else if (IsEqualGUID(device_iid, &IID_IDirect3DNullDevice))
4445  {
4446  TRACE("Asked for NULLREF device.\n");
4448  }
4449  else
4450  {
4451  FIXME("Unexpected device GUID %s.\n", debugstr_guid(device_iid));
4453  }
4454 
4456  /* We need an adapter format from somewhere to please wined3d and WGL.
4457  * Use the current display mode. So far all cards offer the same depth
4458  * stencil format for all modes, but if some do not and applications do
4459  * not like that we'll have to find some workaround, like iterating over
4460  * all imaginable formats and collecting all the depth stencil formats we
4461  * can get. */
4463  {
4464  ERR("Failed to get display mode, hr %#x.\n", hr);
4466  return hr;
4467  }
4468 
4469  for (i = 0; i < ARRAY_SIZE(formats); ++i)
4470  {
4473  {
4474  DDPIXELFORMAT pformat;
4475 
4476  memset(&pformat, 0, sizeof(pformat));
4477  pformat.dwSize = sizeof(pformat);
4479 
4480  TRACE("Enumerating wined3d format %#x.\n", formats[i]);
4481  hr = callback(&pformat, context);
4482  if (hr != DDENUMRET_OK)
4483  {
4484  TRACE("Format enumeration cancelled by application.\n");
4486  return D3D_OK;
4487  }
4488  }
4489  }
4490 
4491  /* Historically some windows drivers used dwZBufferBitDepth=24 for WINED3DFMT_X8D24_UNORM,
4492  * while others used dwZBufferBitDepth=32. In either case the pitch matches a 32 bits per
4493  * pixel format, so we use dwZBufferBitDepth=32. Some games expect 24. Windows Vista and
4494  * newer enumerate both versions, so we do the same(bug 22434) */
4497  {
4498  DDPIXELFORMAT x8d24 =
4499  {
4500  sizeof(x8d24), DDPF_ZBUFFER, 0,
4501  {24}, {0x00000000}, {0x00ffffff}, {0x00000000}
4502  };
4503  TRACE("Enumerating WINED3DFMT_X8D24_UNORM, dwZBufferBitDepth=24 version\n");
4504  callback(&x8d24, context);
4505  }
4506 
4507  TRACE("End of enumeration.\n");
4508 
4510 
4511  return D3D_OK;
4512 }
HRESULT CDECL wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UINT adapter_idx, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
Definition: directx.c:4767
HRESULT hr
Definition: shlfolder.c:183
Definition: http.c:6587
struct wined3d * wined3d
Definition: ddraw_private.h:92
static const struct pixel_format_desc formats[]
Definition: util.c:57
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, DWORD usage, enum wined3d_resource_type resource_type, enum wined3d_format_id check_format_id)
Definition: directx.c:5334
#define WINED3DUSAGE_DEPTHSTENCIL
Definition: wined3d.h:900
const GUID IID_D3DDEVICE_WineD3D
Definition: device.c:39
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define WINED3DADAPTER_DEFAULT
Definition: wined3d.h:857
#define DDENUMRET_OK
Definition: ddraw.h:189
GLenum mode
Definition: glext.h:6217
static struct ddraw * impl_from_IDirect3D7(IDirect3D7 *iface)
Definition: ddraw.c:123
wined3d_format_id
Definition: wined3d.h:105
#define ERR(fmt,...)
Definition: debug.h:109
#define D3D_OK
Definition: d3d.h:106
#define ARRAY_SIZE(a)
Definition: main.h:24
wined3d_device_type
Definition: wined3d.h:85
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define DDPF_ZBUFFER
Definition: ddraw.h:511
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
#define memset(x, y, z)
Definition: compat.h:39
DWORD dwSize
Definition: ddraw.h:1070
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
void ddrawformat_from_wined3dformat(DDPIXELFORMAT *ddraw_format, enum wined3d_format_id wined3d_format) DECLSPEC_HIDDEN
Definition: utils.c:33
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by d3d3_EnumZBufferFormats().

◆ d3d7_EvictManagedTextures()

static HRESULT WINAPI d3d7_EvictManagedTextures ( IDirect3D7 *  iface)
static

Definition at line 4537 of file ddraw.c.

4538 {
4539  struct ddraw *ddraw = impl_from_IDirect3D7(iface);
4540 
4541  TRACE("iface %p!\n", iface);
4542 
4547 
4548  return D3D_OK;
4549 }
void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
Definition: device.c:4753
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define DDRAW_D3D_INITIALIZED
Definition: ddraw_private.h:55
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirect3D7(IDirect3D7 *iface)
Definition: ddraw.c:123
DWORD flags
Definition: ddraw_private.h:94
#define D3D_OK
Definition: d3d.h:106
struct wined3d_device * wined3d_device
Definition: ddraw_private.h:93
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373

Referenced by d3d3_EvictManagedTextures().

◆ d3d7_QueryInterface()

static HRESULT WINAPI d3d7_QueryInterface ( IDirect3D7 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 230 of file ddraw.c.

231 {
232  struct ddraw *ddraw = impl_from_IDirect3D7(iface);
233 
234  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
235 
237 }
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID riid, void **out)
Definition: ddraw.c:128
static struct ddraw * impl_from_IDirect3D7(IDirect3D7 *iface)
Definition: ddraw.c:123
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ d3d7_Release()

static ULONG WINAPI d3d7_Release ( IDirect3D7 *  iface)
static

Definition at line 511 of file ddraw.c.

512 {
513  struct ddraw *This = impl_from_IDirect3D7(iface);
514 
515  TRACE("iface %p.\n", iface);
516 
517  return ddraw7_Release(&This->IDirectDraw7_iface);
518 }
static ULONG WINAPI ddraw7_Release(IDirectDraw7 *iface)
Definition: ddraw.c:459
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirect3D7(IDirect3D7 *iface)
Definition: ddraw.c:123

◆ ddraw1_AddRef()

static ULONG WINAPI ddraw1_AddRef ( IDirectDraw *  iface)
static

Definition at line 320 of file ddraw.c.

321 {
322  struct ddraw *This = impl_from_IDirectDraw(iface);
324 
325  TRACE("%p increasing refcount to %u.\n", This, ref);
326 
327  if (ref == 1) InterlockedIncrement(&This->numIfaces);
328 
329  return ref;
330 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

Referenced by d3d1_AddRef(), d3d2_AddRef(), and d3d3_AddRef().

◆ ddraw1_Compact()

static HRESULT WINAPI ddraw1_Compact ( IDirectDraw *  iface)
static

Definition at line 1632 of file ddraw.c.

1633 {
1634  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
1635 
1636  TRACE("iface %p.\n", iface);
1637 
1639 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
static HRESULT WINAPI ddraw7_Compact(IDirectDraw7 *iface)
Definition: ddraw.c:1607
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw1_CreateClipper()

static HRESULT WINAPI ddraw1_CreateClipper ( IDirectDraw *  iface,
DWORD  flags,
IDirectDrawClipper **  clipper,
IUnknown outer_unknown 
)
static

Definition at line 3466 of file ddraw.c.

3468 {
3469  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
3470 
3471  TRACE("iface %p, flags %#x, clipper %p, outer_unknown %p.\n",
3472  iface, flags, clipper, outer_unknown);
3473 
3474  return ddraw7_CreateClipper(&ddraw->IDirectDraw7_iface, flags, clipper, outer_unknown);
3475 }
static HRESULT WINAPI ddraw7_CreateClipper(IDirectDraw7 *iface, DWORD Flags, IDirectDrawClipper **Clipper, IUnknown *UnkOuter)
Definition: ddraw.c:3435
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
GLbitfield flags
Definition: glext.h:7161
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw1_CreatePalette()

static HRESULT WINAPI ddraw1_CreatePalette ( IDirectDraw *  iface,
DWORD  flags,
PALETTEENTRY entries,
IDirectDrawPalette **  palette,
IUnknown outer_unknown 
)
static

Definition at line 3580 of file ddraw.c.

3582 {
3583  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
3584  HRESULT hr;
3585 
3586  TRACE("iface %p, flags %#x, entries %p, palette %p, outer_unknown %p.\n",
3587  iface, flags, entries, palette, outer_unknown);
3588 
3589  hr = ddraw7_CreatePalette(&ddraw->IDirectDraw7_iface, flags, entries, palette, outer_unknown);
3590  if (SUCCEEDED(hr) && *palette)
3591  {
3593  IDirectDraw7_Release(&ddraw->IDirectDraw7_iface);
3594  impl->ifaceToRelease = NULL;
3595  }
3596 
3597  return hr;
3598 }
IUnknown * ifaceToRelease
HRESULT hr
Definition: shlfolder.c:183
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
GLbitfield flags
Definition: glext.h:7161
static HPALETTE palette
Definition: clipboard.c:1345
static HRESULT WINAPI ddraw7_CreatePalette(IDirectDraw7 *iface, DWORD Flags, PALETTEENTRY *ColorTable, IDirectDrawPalette **Palette, IUnknown *pUnkOuter)
Definition: ddraw.c:3494
static struct ddraw_palette * impl_from_IDirectDrawPalette(IDirectDrawPalette *iface)
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ ddraw1_CreateSurface()

static HRESULT WINAPI ddraw1_CreateSurface ( IDirectDraw *  iface,
DDSURFACEDESC surface_desc,
IDirectDrawSurface **  surface,
IUnknown outer_unknown 
)
static

Definition at line 3003 of file ddraw.c.

3005 {
3006  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
3007  struct ddraw_surface *impl;
3008  HRESULT hr;
3009  DDSURFACEDESC2 surface_desc2;
3010 
3011  TRACE("iface %p, surface_desc %p, surface %p, outer_unknown %p.\n",
3012  iface, surface_desc, surface, outer_unknown);
3013 
3015 
3017  {
3018  WARN("Cooperative level not set.\n");
3021  }
3022 
3023  if(surface_desc == NULL || surface_desc->dwSize != sizeof(DDSURFACEDESC))
3024  {
3025  WARN("Application supplied invalid surface descriptor\n");
3027  return DDERR_INVALIDPARAMS;
3028  }
3029 
3030  __TRY
3031  {
3032  *surface = NULL;
3033  }
3035  {
3036  WARN("Surface pointer %p is invalid.\n", surface);
3038  return DDERR_INVALIDPARAMS;
3039  }
3040  __ENDTRY;
3041 
3046  {
3047  WARN("Application tried to create an explicit front or back buffer.\n");
3049  return DDERR_INVALIDCAPS;
3050  }
3051 
3052  DDSD_to_DDSD2(surface_desc, &surface_desc2);
3053  hr = ddraw_surface_create(ddraw, &surface_desc2, &impl, outer_unknown, 1);
3055  if (FAILED(hr))
3056  return hr;
3057 
3058  *surface = &impl->IDirectDrawSurface_iface;
3059  impl->ifaceToRelease = NULL;
3060 
3061  return hr;
3062 }
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
Definition: utils.c:1218
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:111
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define DDERR_NOCOOPERATIVELEVELSET
Definition: ddraw.h:89
#define DDSCL_EXCLUSIVE
Definition: ddraw.h:536
#define DDSCAPS_FLIP
Definition: ddraw.h:253
HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_desc, struct ddraw_surface **surface, IUnknown *outer_unknown, unsigned int version) DECLSPEC_HIDDEN
Definition: surface.c:5791
DDSCAPS2 ddsCaps
Definition: ddraw.h:1188
DWORD dwCaps
Definition: ddraw.h:732
smooth NULL
Definition: ftsmooth.c:416
IDirectDrawSurface IDirectDrawSurface_iface
#define DDSCAPS_FRONTBUFFER
Definition: ddraw.h:254
#define __TRY
Definition: compat.h:70
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
LONG HRESULT
Definition: typedefs.h:77
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
#define __ENDTRY
Definition: compat.h:72
DWORD dwSize
Definition: ddraw.h:1152
#define DDSCAPS_BACKBUFFER
Definition: ddraw.h:251
#define DDSCAPS_PRIMARYSURFACE
Definition: ddraw.h:258
#define DDERR_INVALIDCAPS
Definition: ddraw.h:75
#define DDSCL_NORMAL
Definition: ddraw.h:535
DWORD cooperative_level
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
IUnknown * ifaceToRelease
#define __EXCEPT_PAGE_FAULT
Definition: compat.h:71

◆ ddraw1_DuplicateSurface()

static HRESULT WINAPI ddraw1_DuplicateSurface ( IDirectDraw *  iface,
IDirectDrawSurface *  src,
IDirectDrawSurface **  dst 
)
static

Definition at line 3677 of file ddraw.c.

3679 {
3681  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
3682  struct ddraw_surface *dst_impl;
3683  IDirectDrawSurface7 *dst7;
3684  HRESULT hr;
3685 
3686  TRACE("iface %p, src %p, dst %p.\n", iface, src, dst);
3687 
3689  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, &dst7);
3690  if (FAILED(hr))
3691  return hr;
3692  dst_impl = impl_from_IDirectDrawSurface7(dst7);
3693  *dst = &dst_impl->IDirectDrawSurface_iface;
3694  IDirectDrawSurface_AddRef(*dst);
3695  IDirectDrawSurface7_Release(dst7);
3696 
3697  return hr;
3698 }
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface) DECLSPEC_HIDDEN
Definition: surface.c:5705
HRESULT hr
Definition: shlfolder.c:183
static HRESULT WINAPI ddraw7_DuplicateSurface(IDirectDraw7 *iface, IDirectDrawSurface7 *Src, IDirectDrawSurface7 **Dest)
Definition: ddraw.c:3617
static struct ddraw_surface * impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
smooth NULL
Definition: ftsmooth.c:416
IDirectDrawSurface IDirectDrawSurface_iface
DWORD IDirectDrawSurface7
Definition: vmrender.idl:20
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
GLenum src
Definition: glext.h:6340
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLenum GLenum dst
Definition: glext.h:6340
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw1_EnumDisplayModes()

static HRESULT WINAPI ddraw1_EnumDisplayModes ( IDirectDraw *  iface,
DWORD  flags,
DDSURFACEDESC surface_desc,
void context,
LPDDENUMMODESCALLBACK  callback 
)
static

Definition at line 2553 of file ddraw.c.

2555 {
2556  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
2557  struct displaymodescallback_context cbcontext;
2558  DDSURFACEDESC2 surface_desc2;
2559 
2560  TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n",
2561  iface, flags, surface_desc, context, callback);
2562 
2563  cbcontext.func = callback;
2564  cbcontext.context = context;
2565 
2566  if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
2568  surface_desc ? &surface_desc2 : NULL, &cbcontext, EnumDisplayModesCallbackThunk);
2569 }
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
Definition: utils.c:1218
Definition: http.c:6587
smooth NULL
Definition: ftsmooth.c:416
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, DDSURFACEDESC2 *DDSD, void *Context, LPDDENUMMODESCALLBACK2 cb)
Definition: ddraw.c:2405
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
static HRESULT CALLBACK EnumDisplayModesCallbackThunk(DDSURFACEDESC2 *surface_desc, void *context)
Definition: ddraw.c:2378

◆ ddraw1_EnumSurfaces()

static HRESULT WINAPI ddraw1_EnumSurfaces ( IDirectDraw *  iface,
DWORD  flags,
DDSURFACEDESC surface_desc,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 3361 of file ddraw.c.

3363 {
3364  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
3365  struct surfacescallback_context cbcontext;
3366  DDSURFACEDESC2 surface_desc2;
3367 
3368  TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n",
3369  iface, flags, surface_desc, context, callback);
3370 
3371  cbcontext.func = callback;
3372  cbcontext.context = context;
3373 
3374  if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
3376  surface_desc ? &surface_desc2 : NULL, &cbcontext, EnumSurfacesCallbackThunk);
3377 }
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
Definition: utils.c:1218
Definition: http.c:6587
smooth NULL
Definition: ftsmooth.c:416
static HRESULT WINAPI ddraw7_EnumSurfaces(IDirectDraw7 *iface, DWORD Flags, DDSURFACEDESC2 *DDSD, void *Context, LPDDENUMSURFACESCALLBACK7 Callback)
Definition: ddraw.c:3227
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
GLbitfield flags
Definition: glext.h:7161
static HRESULT CALLBACK EnumSurfacesCallbackThunk(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: ddraw.c:3195
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw1_FlipToGDISurface()

static HRESULT WINAPI ddraw1_FlipToGDISurface ( IDirectDraw *  iface)
static

Definition at line 2125 of file ddraw.c.

2126 {
2127  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
2128 
2129  TRACE("iface %p.\n", iface);
2130 
2132 }
static HRESULT WINAPI ddraw7_FlipToGDISurface(IDirectDraw7 *iface)
Definition: ddraw.c:2093
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw1_GetCaps()

static HRESULT WINAPI ddraw1_GetCaps ( IDirectDraw *  iface,
DDCAPS driver_caps,
DDCAPS hel_caps 
)
static

Definition at line 1589 of file ddraw.c.

1590 {
1591  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
1592 
1593  TRACE("iface %p, driver_caps %p, hel_caps %p.\n", iface, driver_caps, hel_caps);
1594 
1595  return ddraw7_GetCaps(&ddraw->IDirectDraw7_iface, driver_caps, hel_caps);
1596 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DDCAPS *HELCaps)
Definition: ddraw.c:1479

◆ ddraw1_GetDisplayMode()

static HRESULT WINAPI ddraw1_GetDisplayMode ( IDirectDraw *  iface,
DDSURFACEDESC surface_desc 
)
static

Definition at line 1719 of file ddraw.c.

1720 {
1721  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
1722  HRESULT hr;
1723 
1724  TRACE("iface %p, surface_desc %p.\n", iface, surface_desc);
1725 
1727  if (SUCCEEDED(hr)) surface_desc->dwSize = sizeof(*surface_desc);
1728  return hr;
1729 }
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
static HRESULT WINAPI ddraw7_GetDisplayMode(IDirectDraw7 *iface, DDSURFACEDESC2 *DDSD)
Definition: ddraw.c:1655
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ ddraw1_GetFourCCCodes()

static HRESULT WINAPI ddraw1_GetFourCCCodes ( IDirectDraw *  iface,
DWORD codes_count,
DWORD codes 
)
static

Definition at line 1807 of file ddraw.c.

1808 {
1809  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
1810 
1811  TRACE("iface %p, codes_count %p, codes %p.\n", iface, codes_count, codes);
1812 
1813  return ddraw7_GetFourCCCodes(&ddraw->IDirectDraw7_iface, codes_count, codes);
1814 }
static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes, DWORD *Codes)
Definition: ddraw.c:1748
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw1_GetGDISurface()

static HRESULT WINAPI ddraw1_GetGDISurface ( IDirectDraw *  iface,
IDirectDrawSurface **  surface 
)
static

Definition at line 2349 of file ddraw.c.

2350 {
2351  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
2352  struct ddraw_surface *surface_impl;
2353  IDirectDrawSurface7 *surface7;
2354  HRESULT hr;
2355 
2356  TRACE("iface %p, surface %p.\n", iface, surface);
2357 
2359  if (FAILED(hr))
2360  {
2361  *surface = NULL;
2362  return hr;
2363  }
2364  surface_impl = impl_from_IDirectDrawSurface7(surface7);
2365  *surface = &surface_impl->IDirectDrawSurface_iface;
2366  IDirectDrawSurface_AddRef(*surface);
2367  IDirectDrawSurface7_Release(surface7);
2368 
2369  return hr;
2370 }
HRESULT hr
Definition: shlfolder.c:183
static struct ddraw_surface * impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
smooth NULL
Definition: ftsmooth.c:416
IDirectDrawSurface IDirectDrawSurface_iface
DWORD IDirectDrawSurface7
Definition: vmrender.idl:20
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
static HRESULT WINAPI ddraw7_GetGDISurface(IDirectDraw7 *iface, IDirectDrawSurface7 **GDISurface)
Definition: ddraw.c:2282
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw1_GetMonitorFrequency()

static HRESULT WINAPI ddraw1_GetMonitorFrequency ( IDirectDraw *  iface,
DWORD frequency 
)
static

Definition at line 1856 of file ddraw.c.

1857 {
1858  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
1859 
1860  TRACE("iface %p, frequency %p.\n", iface, frequency);
1861 
1863 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
static LARGE_INTEGER * frequency
Definition: time.c:106
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
static HRESULT WINAPI ddraw7_GetMonitorFrequency(IDirectDraw7 *iface, DWORD *frequency)
Definition: ddraw.c:1816

◆ ddraw1_GetScanLine()

static HRESULT WINAPI ddraw1_GetScanLine ( IDirectDraw *  iface,
DWORD line 
)
static

Definition at line 2241 of file ddraw.c.

2242 {
2243  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
2244 
2245  TRACE("iface %p, line %p.\n", iface, line);
2246 
2248 }
Definition: parser.c:48
static HRESULT WINAPI ddraw7_GetScanLine(IDirectDraw7 *iface, DWORD *Scanline)
Definition: ddraw.c:2198
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw1_GetVerticalBlankStatus()

static HRESULT WINAPI ddraw1_GetVerticalBlankStatus ( IDirectDraw *  iface,
BOOL status 
)
static

Definition at line 1908 of file ddraw.c.

1909 {
1910  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
1911 
1912  TRACE("iface %p, status %p.\n", iface, status);
1913 
1915 }
static HRESULT WINAPI ddraw7_GetVerticalBlankStatus(IDirectDraw7 *iface, BOOL *status)
Definition: ddraw.c:1865
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
Definition: ps.c:97

◆ ddraw1_Initialize()

static HRESULT WINAPI ddraw1_Initialize ( IDirectDraw *  iface,
GUID guid 
)
static

Definition at line 2064 of file ddraw.c.

2065 {
2066  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
2067 
2068  TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid));
2069 
2071 }
static HRESULT WINAPI ddraw7_Initialize(IDirectDraw7 *iface, GUID *guid)
Definition: ddraw.c:2028
const GUID * guid
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw1_QueryInterface()

static HRESULT WINAPI ddraw1_QueryInterface ( IDirectDraw *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 221 of file ddraw.c.

222 {
223  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
224 
225  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
226 
228 }
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID riid, void **out)
Definition: ddraw.c:128
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw1_Release()

static ULONG WINAPI ddraw1_Release ( IDirectDraw *  iface)
static

Definition at line 498 of file ddraw.c.

499 {
500  struct ddraw *This = impl_from_IDirectDraw(iface);
502 
503  TRACE("%p decreasing refcount to %u.\n", This, ref);
504 
505  if (!ref && !InterlockedDecrement(&This->numIfaces))
507 
508  return ref;
509 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
#define InterlockedDecrement
Definition: armddk.h:52
static void ddraw_destroy(struct ddraw *This)
Definition: ddraw.c:423
unsigned int ULONG
Definition: retypes.h:1

Referenced by d3d1_Release(), d3d2_Release(), and d3d3_Release().

◆ ddraw1_RestoreDisplayMode()

static HRESULT WINAPI ddraw1_RestoreDisplayMode ( IDirectDraw *  iface)
static

Definition at line 727 of file ddraw.c.

728 {
729  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
730 
731  TRACE("iface %p.\n", iface);
732 
734 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface)
Definition: ddraw.c:678
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw1_SetCooperativeLevel()

static HRESULT WINAPI ddraw1_SetCooperativeLevel ( IDirectDraw *  iface,
HWND  window,
DWORD  flags 
)
static

Definition at line 1049 of file ddraw.c.

1050 {
1051  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
1052  HRESULT hr;
1053 
1054  TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags);
1055 
1057  if (SUCCEEDED(hr))
1059  return hr;
1060 }
HRESULT hr
Definition: shlfolder.c:183
static HRESULT ddraw_set_cooperative_level(struct ddraw *ddraw, HWND window, DWORD cooplevel, BOOL restore_mode_on_normal)
Definition: ddraw.c:778
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
GLbitfield flags
Definition: glext.h:7161
static IHTMLWindow2 * window
Definition: events.c:77
DWORD flags
Definition: ddraw_private.h:94
#define DDRAW_SCL_DDRAW1
Definition: ddraw_private.h:58
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ ddraw1_SetDisplayMode()

static HRESULT WINAPI ddraw1_SetDisplayMode ( IDirectDraw *  iface,
DWORD  width,
DWORD  height,
DWORD  bpp 
)
static

Definition at line 1183 of file ddraw.c.

1184 {
1185  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
1186 
1187  TRACE("iface %p, width %u, height %u, bpp %u.\n", iface, width, height, bpp);
1188 
1190 }
GLint GLint GLsizei width
Definition: gl.h:1546
static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD width, DWORD height, DWORD bpp, DWORD refresh_rate, DWORD flags)
Definition: ddraw.c:1084
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
DWORD bpp
Definition: surface.c:181

◆ ddraw1_WaitForVerticalBlank()

static HRESULT WINAPI ddraw1_WaitForVerticalBlank ( IDirectDraw *  iface,
DWORD  flags,
HANDLE  event 
)
static

Definition at line 2189 of file ddraw.c.

2190 {
2191  struct ddraw *ddraw = impl_from_IDirectDraw(iface);
2192 
2193  TRACE("iface %p, flags %#x, event %p.\n", iface, flags, event);
2194 
2196 }
#define TRACE(s)
Definition: solgame.cpp:4
static struct ddraw * impl_from_IDirectDraw(IDirectDraw *iface)
Definition: ddraw.c:88
GLbitfield flags
Definition: glext.h:7161
struct _cl_event * event
Definition: glext.h:7739
static HRESULT WINAPI ddraw7_WaitForVerticalBlank(IDirectDraw7 *iface, DWORD Flags, HANDLE event)
Definition: ddraw.c:2151
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_AddRef()

static ULONG WINAPI ddraw2_AddRef ( IDirectDraw2 *  iface)
static

Definition at line 308 of file ddraw.c.

309 {
310  struct ddraw *This = impl_from_IDirectDraw2(iface);
312 
313  TRACE("%p increasing refcount to %u.\n", This, ref);
314 
315  if (ref == 1) InterlockedIncrement(&This->numIfaces);
316 
317  return ref;
318 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ ddraw2_Compact()

static HRESULT WINAPI ddraw2_Compact ( IDirectDraw2 *  iface)
static

Definition at line 1623 of file ddraw.c.

1624 {
1625  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
1626 
1627  TRACE("iface %p.\n", iface);
1628 
1630 }
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw7_Compact(IDirectDraw7 *iface)
Definition: ddraw.c:1607
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_CreateClipper()

static HRESULT WINAPI ddraw2_CreateClipper ( IDirectDraw2 *  iface,
DWORD  flags,
IDirectDrawClipper **  clipper,
IUnknown outer_unknown 
)
static

Definition at line 3455 of file ddraw.c.

3457 {
3458  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
3459 
3460  TRACE("iface %p, flags %#x, clipper %p, outer_unknown %p.\n",
3461  iface, flags, clipper, outer_unknown);
3462 
3463  return ddraw7_CreateClipper(&ddraw->IDirectDraw7_iface, flags, clipper, outer_unknown);
3464 }
static HRESULT WINAPI ddraw7_CreateClipper(IDirectDraw7 *iface, DWORD Flags, IDirectDrawClipper **Clipper, IUnknown *UnkOuter)
Definition: ddraw.c:3435
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_CreatePalette()

static HRESULT WINAPI ddraw2_CreatePalette ( IDirectDraw2 *  iface,
DWORD  flags,
PALETTEENTRY entries,
IDirectDrawPalette **  palette,
IUnknown outer_unknown 
)
static

Definition at line 3560 of file ddraw.c.

3562 {
3563  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
3564  HRESULT hr;
3565 
3566  TRACE("iface %p, flags %#x, entries %p, palette %p, outer_unknown %p.\n",
3567  iface, flags, entries, palette, outer_unknown);
3568 
3569  hr = ddraw7_CreatePalette(&ddraw->IDirectDraw7_iface, flags, entries, palette, outer_unknown);
3570  if (SUCCEEDED(hr) && *palette)
3571  {
3573  IDirectDraw7_Release(&ddraw->IDirectDraw7_iface);
3574  impl->ifaceToRelease = NULL;
3575  }
3576 
3577  return hr;
3578 }
IUnknown * ifaceToRelease
HRESULT hr
Definition: shlfolder.c:183
smooth NULL
Definition: ftsmooth.c:416
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
GLbitfield flags
Definition: glext.h:7161
static HPALETTE palette
Definition: clipboard.c:1345
static HRESULT WINAPI ddraw7_CreatePalette(IDirectDraw7 *iface, DWORD Flags, PALETTEENTRY *ColorTable, IDirectDrawPalette **Palette, IUnknown *pUnkOuter)
Definition: ddraw.c:3494
static struct ddraw_palette * impl_from_IDirectDrawPalette(IDirectDrawPalette *iface)
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ ddraw2_CreateSurface()

static HRESULT WINAPI ddraw2_CreateSurface ( IDirectDraw2 *  iface,
DDSURFACEDESC surface_desc,
IDirectDrawSurface **  surface,
IUnknown outer_unknown 
)
static

Definition at line 2939 of file ddraw.c.

2941 {
2942  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
2943  struct ddraw_surface *impl;
2944  HRESULT hr;
2945  DDSURFACEDESC2 surface_desc2;
2946 
2947  TRACE("iface %p, surface_desc %p, surface %p, outer_unknown %p.\n",
2948  iface, surface_desc, surface, outer_unknown);
2949 
2951 
2953  {
2954  WARN("Cooperative level not set.\n");
2957  }
2958 
2959  if(surface_desc == NULL || surface_desc->dwSize != sizeof(DDSURFACEDESC))
2960  {
2961  WARN("Application supplied invalid surface descriptor\n");
2963  return DDERR_INVALIDPARAMS;
2964  }
2965 
2966  __TRY
2967  {
2968  *surface = NULL;
2969  }
2971  {
2972  WARN("Surface pointer %p is invalid.\n", surface);
2974  return DDERR_INVALIDPARAMS;
2975  }
2976  __ENDTRY;
2977 
2978  DDSD_to_DDSD2(surface_desc, &surface_desc2);
2980  {
2981  if (TRACE_ON(ddraw))
2982  {
2983  TRACE(" (%p) Requesting surface desc :\n", iface);
2985  }
2986 
2987  WARN("Application tried to create an explicit front or back buffer\n");
2989  return DDERR_INVALIDCAPS;
2990  }
2991 
2992  hr = ddraw_surface_create(ddraw, &surface_desc2, &impl, outer_unknown, 2);
2994  if (FAILED(hr))
2995  return hr;
2996 
2997  *surface = &impl->IDirectDrawSurface_iface;
2998  impl->ifaceToRelease = NULL;
2999 
3000  return hr;
3001 }
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
Definition: utils.c:1218
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:111
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
#define DDERR_NOCOOPERATIVELEVELSET
Definition: ddraw.h:89
#define DDSCL_EXCLUSIVE
Definition: ddraw.h:536
HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_desc, struct ddraw_surface **surface, IUnknown *outer_unknown, unsigned int version) DECLSPEC_HIDDEN
Definition: surface.c:5791
DDSCAPS2 ddsCaps
Definition: ddraw.h:1188
DWORD dwCaps
Definition: ddraw.h:732
smooth NULL
Definition: ftsmooth.c:416
IDirectDrawSurface IDirectDrawSurface_iface
#define DDSCAPS_FRONTBUFFER
Definition: ddraw.h:254
#define __TRY
Definition: compat.h:70
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
LONG HRESULT
Definition: typedefs.h:77
#define __ENDTRY
Definition: compat.h:72
DWORD dwSize
Definition: ddraw.h:1152
void DDRAW_dump_surface_desc(const DDSURFACEDESC2 *lpddsd) DECLSPEC_HIDDEN
Definition: utils.c:864
#define DDSCAPS_BACKBUFFER
Definition: ddraw.h:251
#define DDERR_INVALIDCAPS
Definition: ddraw.h:75
#define DDSCL_NORMAL
Definition: ddraw.h:535
DWORD cooperative_level
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
#define TRACE_ON(x)
Definition: compat.h:65
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
IUnknown * ifaceToRelease
#define __EXCEPT_PAGE_FAULT
Definition: compat.h:71

◆ ddraw2_DuplicateSurface()

static HRESULT WINAPI ddraw2_DuplicateSurface ( IDirectDraw2 *  iface,
IDirectDrawSurface *  src,
IDirectDrawSurface **  dst 
)
static

Definition at line 3654 of file ddraw.c.

3656 {
3658  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
3659  struct ddraw_surface *dst_impl;
3660  IDirectDrawSurface7 *dst7;
3661  HRESULT hr;
3662 
3663  TRACE("iface %p, src %p, dst %p.\n", iface, src, dst);
3664 
3666  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, &dst7);
3667  if (FAILED(hr))
3668  return hr;
3669  dst_impl = impl_from_IDirectDrawSurface7(dst7);
3670  *dst = &dst_impl->IDirectDrawSurface_iface;
3671  IDirectDrawSurface_AddRef(*dst);
3672  IDirectDrawSurface7_Release(dst7);
3673 
3674  return hr;
3675 }
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface(IDirectDrawSurface *iface) DECLSPEC_HIDDEN
Definition: surface.c:5705
HRESULT hr
Definition: shlfolder.c:183
static HRESULT WINAPI ddraw7_DuplicateSurface(IDirectDraw7 *iface, IDirectDrawSurface7 *Src, IDirectDrawSurface7 **Dest)
Definition: ddraw.c:3617
static struct ddraw_surface * impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
smooth NULL
Definition: ftsmooth.c:416
IDirectDrawSurface IDirectDrawSurface_iface
DWORD IDirectDrawSurface7
Definition: vmrender.idl:20
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
GLenum src
Definition: glext.h:6340
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLenum GLenum dst
Definition: glext.h:6340
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_EnumDisplayModes()

static HRESULT WINAPI ddraw2_EnumDisplayModes ( IDirectDraw2 *  iface,
DWORD  flags,
DDSURFACEDESC surface_desc,
void context,
LPDDENUMMODESCALLBACK  callback 
)
static

Definition at line 2535 of file ddraw.c.

2537 {
2538  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
2539  struct displaymodescallback_context cbcontext;
2540  DDSURFACEDESC2 surface_desc2;
2541 
2542  TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n",
2543  iface, flags, surface_desc, context, callback);
2544 
2545  cbcontext.func = callback;
2546  cbcontext.context = context;
2547 
2548  if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
2550  surface_desc ? &surface_desc2 : NULL, &cbcontext, EnumDisplayModesCallbackThunk);
2551 }
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
Definition: utils.c:1218
Definition: http.c:6587
smooth NULL
Definition: ftsmooth.c:416
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, DDSURFACEDESC2 *DDSD, void *Context, LPDDENUMMODESCALLBACK2 cb)
Definition: ddraw.c:2405
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
static HRESULT CALLBACK EnumDisplayModesCallbackThunk(DDSURFACEDESC2 *surface_desc, void *context)
Definition: ddraw.c:2378

◆ ddraw2_EnumSurfaces()

static HRESULT WINAPI ddraw2_EnumSurfaces ( IDirectDraw2 *  iface,
DWORD  flags,
DDSURFACEDESC surface_desc,
void context,
LPDDENUMSURFACESCALLBACK  callback 
)
static

Definition at line 3343 of file ddraw.c.

3345 {
3346  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
3347  struct surfacescallback_context cbcontext;
3348  DDSURFACEDESC2 surface_desc2;
3349 
3350  TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n",
3351  iface, flags, surface_desc, context, callback);
3352 
3353  cbcontext.func = callback;
3354  cbcontext.context = context;
3355 
3356  if (surface_desc) DDSD_to_DDSD2(surface_desc, &surface_desc2);
3358  surface_desc ? &surface_desc2 : NULL, &cbcontext, EnumSurfacesCallbackThunk);
3359 }
void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out) DECLSPEC_HIDDEN
Definition: utils.c:1218
Definition: http.c:6587
smooth NULL
Definition: ftsmooth.c:416
static HRESULT WINAPI ddraw7_EnumSurfaces(IDirectDraw7 *iface, DWORD Flags, DDSURFACEDESC2 *DDSD, void *Context, LPDDENUMSURFACESCALLBACK7 Callback)
Definition: ddraw.c:3227
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static HRESULT CALLBACK EnumSurfacesCallbackThunk(IDirectDrawSurface7 *surface, DDSURFACEDESC2 *surface_desc, void *context)
Definition: ddraw.c:3195
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_FlipToGDISurface()

static HRESULT WINAPI ddraw2_FlipToGDISurface ( IDirectDraw2 *  iface)
static

Definition at line 2116 of file ddraw.c.

2117 {
2118  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
2119 
2120  TRACE("iface %p.\n", iface);
2121 
2123 }
static HRESULT WINAPI ddraw7_FlipToGDISurface(IDirectDraw7 *iface)
Definition: ddraw.c:2093
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_GetAvailableVidMem()

static HRESULT WINAPI ddraw2_GetAvailableVidMem ( IDirectDraw2 *  iface,
DDSCAPS caps,
DWORD total,
DWORD free 
)
static

Definition at line 2002 of file ddraw.c.

2004 {
2005  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
2006  DDSCAPS2 caps2;
2007 
2008  TRACE("iface %p, caps %p, total %p, free %p.\n", iface, caps, total, free);
2009 
2010  DDRAW_Convert_DDSCAPS_1_To_2(caps, &caps2);
2011  return ddraw7_GetAvailableVidMem(&ddraw->IDirectDraw7_iface, &caps2, total, free);
2012 }
#define free
Definition: debug_ros.c:5
static HRESULT WINAPI ddraw7_GetAvailableVidMem(IDirectDraw7 *iface, DDSCAPS2 *caps, DWORD *total, DWORD *free)
Definition: ddraw.c:1932
void DDRAW_Convert_DDSCAPS_1_To_2(const DDSCAPS *pIn, DDSCAPS2 *pOut) DECLSPEC_HIDDEN
Definition: utils.c:951
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_GetCaps()

static HRESULT WINAPI ddraw2_GetCaps ( IDirectDraw2 *  iface,
DDCAPS driver_caps,
DDCAPS hel_caps 
)
static

Definition at line 1580 of file ddraw.c.

1581 {
1582  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
1583 
1584  TRACE("iface %p, driver_caps %p, hel_caps %p.\n", iface, driver_caps, hel_caps);
1585 
1586  return ddraw7_GetCaps(&ddraw->IDirectDraw7_iface, driver_caps, hel_caps);
1587 }
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DDCAPS *HELCaps)
Definition: ddraw.c:1479

◆ ddraw2_GetDisplayMode()

static HRESULT WINAPI ddraw2_GetDisplayMode ( IDirectDraw2 *  iface,
DDSURFACEDESC surface_desc 
)
static

Definition at line 1707 of file ddraw.c.

1708 {
1709  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
1710  HRESULT hr;
1711 
1712  TRACE("iface %p, surface_desc %p.\n", iface, surface_desc);
1713 
1715  if (SUCCEEDED(hr)) surface_desc->dwSize = sizeof(*surface_desc);
1716  return hr;
1717 }
HRESULT hr
Definition: shlfolder.c:183
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
static HRESULT WINAPI ddraw7_GetDisplayMode(IDirectDraw7 *iface, DDSURFACEDESC2 *DDSD)
Definition: ddraw.c:1655
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ ddraw2_GetFourCCCodes()

static HRESULT WINAPI ddraw2_GetFourCCCodes ( IDirectDraw2 *  iface,
DWORD codes_count,
DWORD codes 
)
static

Definition at line 1798 of file ddraw.c.

1799 {
1800  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
1801 
1802  TRACE("iface %p, codes_count %p, codes %p.\n", iface, codes_count, codes);
1803 
1804  return ddraw7_GetFourCCCodes(&ddraw->IDirectDraw7_iface, codes_count, codes);
1805 }
static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes, DWORD *Codes)
Definition: ddraw.c:1748
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_GetGDISurface()

static HRESULT WINAPI ddraw2_GetGDISurface ( IDirectDraw2 *  iface,
IDirectDrawSurface **  surface 
)
static

Definition at line 2326 of file ddraw.c.

2327 {
2328  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
2329  struct ddraw_surface *surface_impl;
2330  IDirectDrawSurface7 *surface7;
2331  HRESULT hr;
2332 
2333  TRACE("iface %p, surface %p.\n", iface, surface);
2334 
2336  if (FAILED(hr))
2337  {
2338  *surface = NULL;
2339  return hr;
2340  }
2341  surface_impl = impl_from_IDirectDrawSurface7(surface7);
2342  *surface = &surface_impl->IDirectDrawSurface_iface;
2343  IDirectDrawSurface_AddRef(*surface);
2344  IDirectDrawSurface7_Release(surface7);
2345 
2346  return hr;
2347 }
HRESULT hr
Definition: shlfolder.c:183
static struct ddraw_surface * impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
smooth NULL
Definition: ftsmooth.c:416
IDirectDrawSurface IDirectDrawSurface_iface
DWORD IDirectDrawSurface7
Definition: vmrender.idl:20
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT WINAPI ddraw7_GetGDISurface(IDirectDraw7 *iface, IDirectDrawSurface7 **GDISurface)
Definition: ddraw.c:2282
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_GetMonitorFrequency()

static HRESULT WINAPI ddraw2_GetMonitorFrequency ( IDirectDraw2 *  iface,
DWORD frequency 
)
static

Definition at line 1847 of file ddraw.c.

1848 {
1849  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
1850 
1851  TRACE("iface %p, frequency %p.\n", iface, frequency);
1852 
1854 }
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
static LARGE_INTEGER * frequency
Definition: time.c:106
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
static HRESULT WINAPI ddraw7_GetMonitorFrequency(IDirectDraw7 *iface, DWORD *frequency)
Definition: ddraw.c:1816

◆ ddraw2_GetScanLine()

static HRESULT WINAPI ddraw2_GetScanLine ( IDirectDraw2 *  iface,
DWORD line 
)
static

Definition at line 2232 of file ddraw.c.

2233 {
2234  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
2235 
2236  TRACE("iface %p, line %p.\n", iface, line);
2237 
2239 }
Definition: parser.c:48
static HRESULT WINAPI ddraw7_GetScanLine(IDirectDraw7 *iface, DWORD *Scanline)
Definition: ddraw.c:2198
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_GetVerticalBlankStatus()

static HRESULT WINAPI ddraw2_GetVerticalBlankStatus ( IDirectDraw2 *  iface,
BOOL status 
)
static

Definition at line 1899 of file ddraw.c.

1900 {
1901  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
1902 
1903  TRACE("iface %p, status %p.\n", iface, status);
1904 
1906 }
static HRESULT WINAPI ddraw7_GetVerticalBlankStatus(IDirectDraw7 *iface, BOOL *status)
Definition: ddraw.c:1865
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
Definition: ps.c:97

◆ ddraw2_Initialize()

static HRESULT WINAPI ddraw2_Initialize ( IDirectDraw2 *  iface,
GUID guid 
)
static

Definition at line 2055 of file ddraw.c.

2056 {
2057  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
2058 
2059  TRACE("iface %p, guid %s.\n", iface, debugstr_guid(guid));
2060 
2062 }
static HRESULT WINAPI ddraw7_Initialize(IDirectDraw7 *iface, GUID *guid)
Definition: ddraw.c:2028
const GUID * guid
#define debugstr_guid
Definition: kernel32.h:35
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_QueryInterface()

static HRESULT WINAPI ddraw2_QueryInterface ( IDirectDraw2 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 212 of file ddraw.c.

213 {
214  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
215 
216  TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
217 
219 }
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw7_QueryInterface(IDirectDraw7 *iface, REFIID riid, void **out)
Definition: ddraw.c:128
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_Release()

static ULONG WINAPI ddraw2_Release ( IDirectDraw2 *  iface)
static

Definition at line 485 of file ddraw.c.

486 {
487  struct ddraw *This = impl_from_IDirectDraw2(iface);
489 
490  TRACE("%p decreasing refcount to %u.\n", This, ref);
491 
492  if (!ref && !InterlockedDecrement(&This->numIfaces))
494 
495  return ref;
496 }
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
static void ddraw_destroy(struct ddraw *This)
Definition: ddraw.c:423
unsigned int ULONG
Definition: retypes.h:1

◆ ddraw2_RestoreDisplayMode()

static HRESULT WINAPI ddraw2_RestoreDisplayMode ( IDirectDraw2 *  iface)
static

Definition at line 718 of file ddraw.c.

719 {
720  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
721 
722  TRACE("iface %p.\n", iface);
723 
725 }
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw7_RestoreDisplayMode(IDirectDraw7 *iface)
Definition: ddraw.c:678
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw2_SetCooperativeLevel()

static HRESULT WINAPI ddraw2_SetCooperativeLevel ( IDirectDraw2 *  iface,
HWND  window,
DWORD  flags 
)
static

Definition at line 1040 of file ddraw.c.

1041 {
1042  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
1043 
1044  TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags);
1045 
1047 }
static HRESULT ddraw_set_cooperative_level(struct ddraw *ddraw, HWND window, DWORD cooplevel, BOOL restore_mode_on_normal)
Definition: ddraw.c:778
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static IHTMLWindow2 * window
Definition: events.c:77
DWORD flags
Definition: ddraw_private.h:94
#define DDRAW_SCL_DDRAW1
Definition: ddraw_private.h:58

◆ ddraw2_SetDisplayMode()

static HRESULT WINAPI ddraw2_SetDisplayMode ( IDirectDraw2 *  iface,
DWORD  width,
DWORD  height,
DWORD  bpp,
DWORD  refresh_rate,
DWORD  flags 
)
static

Definition at line 1172 of file ddraw.c.

1174 {
1175  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
1176 
1177  TRACE("iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n",
1178  iface, width, height, bpp, refresh_rate, flags);
1179 
1180  return ddraw7_SetDisplayMode(&ddraw->IDirectDraw7_iface, width, height, bpp, refresh_rate, flags);
1181 }
GLint GLint GLsizei width
Definition: gl.h:1546
static HRESULT WINAPI ddraw7_SetDisplayMode(IDirectDraw7 *iface, DWORD width, DWORD height, DWORD bpp, DWORD refresh_rate, DWORD flags)
Definition: ddraw.c:1084
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
DWORD bpp
Definition: surface.c:181

◆ ddraw2_WaitForVerticalBlank()

static HRESULT WINAPI ddraw2_WaitForVerticalBlank ( IDirectDraw2 *  iface,
DWORD  flags,
HANDLE  event 
)
static

Definition at line 2180 of file ddraw.c.

2181 {
2182  struct ddraw *ddraw = impl_from_IDirectDraw2(iface);
2183 
2184  TRACE("iface %p, flags %#x, event %p.\n", iface, flags, event);
2185 
2187 }
static struct ddraw * impl_from_IDirectDraw2(IDirectDraw2 *iface)
Definition: ddraw.c:93
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
struct _cl_event * event
Definition: glext.h:7739
static HRESULT WINAPI ddraw7_WaitForVerticalBlank(IDirectDraw7 *iface, DWORD Flags, HANDLE event)
Definition: ddraw.c:2151
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw4_AddRef()

static ULONG WINAPI ddraw4_AddRef ( IDirectDraw4 *  iface)
static

Definition at line 296 of file ddraw.c.

297 {
298  struct ddraw *This = impl_from_IDirectDraw4(iface);
300 
301  TRACE("%p increasing refcount to %u.\n", This, ref);
302 
303  if (ref == 1) InterlockedIncrement(&This->numIfaces);
304 
305  return ref;
306 }
static struct ddraw * impl_from_IDirectDraw4(IDirectDraw4 *iface)
Definition: ddraw.c:98
Definition: send.c:47
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ ddraw4_Compact()

static HRESULT WINAPI ddraw4_Compact ( IDirectDraw4 *  iface)
static

Definition at line 1614 of file ddraw.c.

1615 {
1616  struct ddraw *ddraw = impl_from_IDirectDraw4(iface);
1617 
1618  TRACE("iface %p.\n", iface);
1619 
1621 }
static struct ddraw * impl_from_IDirectDraw4(IDirectDraw4 *iface)
Definition: ddraw.c:98
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI ddraw7_Compact(IDirectDraw7 *iface)
Definition: ddraw.c:1607
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw4_CreateClipper()

static HRESULT WINAPI ddraw4_CreateClipper ( IDirectDraw4 *  iface,
DWORD  flags,
IDirectDrawClipper **  clipper,
IUnknown outer_unknown 
)
static

Definition at line 3444 of file ddraw.c.

3446 {
3447  struct ddraw *ddraw = impl_from_IDirectDraw4(iface);
3448 
3449  TRACE("iface %p, flags %#x, clipper %p, outer_unknown %p.\n",
3450  iface, flags, clipper, outer_unknown);
3451 
3452  return ddraw7_CreateClipper(&ddraw->IDirectDraw7_iface, flags, clipper, outer_unknown);
3453 }
static HRESULT WINAPI ddraw7_CreateClipper(IDirectDraw7 *iface, DWORD Flags, IDirectDrawClipper **Clipper, IUnknown *UnkOuter)
Definition: ddraw.c:3435
static struct ddraw * impl_from_IDirectDraw4(IDirectDraw4 *iface)
Definition: ddraw.c:98
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw4_CreatePalette()

static HRESULT WINAPI ddraw4_CreatePalette ( IDirectDraw4 *  iface,
DWORD  flags,
PALETTEENTRY entries,
IDirectDrawPalette **  palette,
IUnknown outer_unknown 
)
static

Definition at line 3540 of file ddraw.c.

3542 {
3543  struct ddraw *ddraw = impl_from_IDirectDraw4(iface);
3544  HRESULT hr;
3545 
3546  TRACE("iface %p, flags %#x, entries %p, palette %p, outer_unknown %p.\n",
3547  iface, flags, entries, palette, outer_unknown);
3548 
3549  hr = ddraw7_CreatePalette(&ddraw->IDirectDraw7_iface, flags, entries, palette, outer_unknown);
3550  if (SUCCEEDED(hr) && *palette)
3551  {
3553  IDirectDraw7_Release(&ddraw->IDirectDraw7_iface);
3554  IDirectDraw4_AddRef(iface);
3555  impl->ifaceToRelease = (IUnknown *)iface;
3556  }
3557  return hr;
3558 }
IUnknown * ifaceToRelease
HRESULT hr
Definition: shlfolder.c:183
static struct ddraw * impl_from_IDirectDraw4(IDirectDraw4 *iface)
Definition: ddraw.c:98
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
GLbitfield flags
Definition: glext.h:7161
static HPALETTE palette
Definition: clipboard.c:1345
static HRESULT WINAPI ddraw7_CreatePalette(IDirectDraw7 *iface, DWORD Flags, PALETTEENTRY *ColorTable, IDirectDrawPalette **Palette, IUnknown *pUnkOuter)
Definition: ddraw.c:3494
static struct ddraw_palette * impl_from_IDirectDrawPalette(IDirectDrawPalette *iface)
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ ddraw4_CreateSurface()

static HRESULT WINAPI ddraw4_CreateSurface ( IDirectDraw4 *  iface,
DDSURFACEDESC2 surface_desc,
IDirectDrawSurface4 **  surface,
IUnknown outer_unknown 
)
static

Definition at line 2876 of file ddraw.c.

2878 {
2879  struct ddraw *ddraw = impl_from_IDirectDraw4(iface);
2880  struct ddraw_surface *impl;
2881  HRESULT hr;
2882 
2883  TRACE("iface %p, surface_desc %p, surface %p, outer_unknown %p.\n",
2884  iface, surface_desc, surface, outer_unknown);
2885 
2887 
2889  {
2890  WARN("Cooperative level not set.\n");
2893  }
2894 
2895  if(surface_desc == NULL || surface_desc->dwSize != sizeof(DDSURFACEDESC2))
2896  {
2897  WARN("Application supplied invalid surface descriptor\n");
2899  return DDERR_INVALIDPARAMS;
2900  }
2901 
2902  __TRY
2903  {
2904  *surface = NULL;
2905  }
2907  {
2908  WARN("Surface pointer %p is invalid.\n", surface);
2910  return DDERR_INVALIDPARAMS;
2911  }
2912  __ENDTRY;
2913 
2915  {
2916  if (TRACE_ON(ddraw))
2917  {
2918  TRACE(" (%p) Requesting surface desc :\n", iface);
2920  }
2921 
2922  WARN("Application tried to create an explicit front or back buffer\n");
2924  return DDERR_INVALIDCAPS;
2925  }
2926 
2927  hr = ddraw_surface_create(ddraw, surface_desc, &impl, outer_unknown, 4);
2929  if (FAILED(hr))
2930  return hr;
2931 
2932  *surface = &impl->IDirectDrawSurface4_iface;
2933  IDirectDraw4_AddRef(iface);
2934  impl->ifaceToRelease = (IUnknown *)iface;
2935 
2936  return hr;
2937 }
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:111
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:368
static struct ddraw * impl_from_IDirectDraw4(IDirectDraw4 *iface)
Definition: ddraw.c:98
#define DDERR_NOCOOPERATIVELEVELSET
Definition: ddraw.h:89
#define DDSCL_EXCLUSIVE
Definition: ddraw.h:536
HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_desc, struct ddraw_surface **surface, IUnknown *outer_unknown, unsigned int version) DECLSPEC_HIDDEN
Definition: surface.c:5791
DDSCAPS2 ddsCaps
Definition: ddraw.h:1188
DWORD dwCaps
Definition: ddraw.h:732
smooth NULL
Definition: ftsmooth.c:416
#define DDSCAPS_FRONTBUFFER
Definition: ddraw.h:254
IDirectDrawSurface4 IDirectDrawSurface4_iface
#define __TRY
Definition: compat.h:70
#define TRACE(s)
Definition: solgame.cpp:4
DDSURFACEDESC2 surface_desc
LONG HRESULT
Definition: typedefs.h:77
#define __ENDTRY
Definition: compat.h:72
DWORD dwSize
Definition: ddraw.h:1152
void DDRAW_dump_surface_desc(const DDSURFACEDESC2 *lpddsd) DECLSPEC_HIDDEN
Definition: utils.c:864
#define DDSCAPS_BACKBUFFER
Definition: ddraw.h:251
#define DDERR_INVALIDCAPS
Definition: ddraw.h:75
#define DDSCL_NORMAL
Definition: ddraw.h:535
DWORD cooperative_level
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:373
#define TRACE_ON(x)
Definition: compat.h:65
#define DDERR_INVALIDPARAMS
Definition: ddraw.h:79
IUnknown * ifaceToRelease
#define __EXCEPT_PAGE_FAULT
Definition: compat.h:71

◆ ddraw4_DuplicateSurface()

static HRESULT WINAPI ddraw4_DuplicateSurface ( IDirectDraw4 *  iface,
IDirectDrawSurface4 *  src,
IDirectDrawSurface4 **  dst 
)
static

Definition at line 3628 of file ddraw.c.

3630 {
3632  struct ddraw *ddraw = impl_from_IDirectDraw4(iface);
3633  struct ddraw_surface *dst_impl;
3634  IDirectDrawSurface7 *dst7;
3635  HRESULT hr;
3636 
3637  TRACE("iface %p, src %p, dst %p.\n", iface, src, dst);
3638 
3640  src_impl ? &src_impl->IDirectDrawSurface7_iface : NULL, &dst7);
3641  if (FAILED(hr))
3642  {
3643  *dst = NULL;
3644  return hr;
3645  }
3646  dst_impl = impl_from_IDirectDrawSurface7(dst7);
3647  *dst = &dst_impl->IDirectDrawSurface4_iface;
3648  IDirectDrawSurface4_AddRef(*dst);
3649  IDirectDrawSurface7_Release(dst7);
3650 
3651  return hr;
3652 }
HRESULT hr
Definition: shlfolder.c:183
static HRESULT WINAPI ddraw7_DuplicateSurface(IDirectDraw7 *iface, IDirectDrawSurface7 *Src, IDirectDrawSurface7 **Dest)
Definition: ddraw.c:3617
static struct ddraw * impl_from_IDirectDraw4(IDirectDraw4 *iface)
Definition: ddraw.c:98
static struct ddraw_surface * impl_from_IDirectDrawSurface7(IDirectDrawSurface7 *iface)
struct ddraw_surface * unsafe_impl_from_IDirectDrawSurface4(IDirectDrawSurface4 *iface) DECLSPEC_HIDDEN
Definition: surface.c:5657
smooth NULL
Definition: ftsmooth.c:416
IDirectDrawSurface4 IDirectDrawSurface4_iface
DWORD IDirectDrawSurface7
Definition: vmrender.idl:20
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
GLenum src
Definition: glext.h:6340
IDirectDrawSurface7 IDirectDrawSurface7_iface
GLenum GLenum dst
Definition: glext.h:6340
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw4_EnumDisplayModes()

static HRESULT WINAPI ddraw4_EnumDisplayModes ( IDirectDraw4 *  iface,
DWORD  flags,
DDSURFACEDESC2 surface_desc,
void context,
LPDDENUMMODESCALLBACK2  callback 
)
static

Definition at line 2524 of file ddraw.c.

2526 {
2527  struct ddraw *ddraw = impl_from_IDirectDraw4(iface);
2528 
2529  TRACE("iface %p, flags %#x, surface_desc %p, context %p, callback %p.\n",
2530  iface, flags, surface_desc, context, callback);
2531 
2533 }
Definition: http.c:6587
static struct ddraw * impl_from_IDirectDraw4(IDirectDraw4 *iface)
Definition: ddraw.c:98
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define TRACE(s)
Definition: solgame.cpp:4
GLbitfield flags
Definition: glext.h:7161
static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags, DDSURFACEDESC2 *DDSD, void *Context, LPDDENUMMODESCALLBACK2 cb)
Definition: ddraw.c:2405
IDirectDraw7 IDirectDraw7_iface
Definition: ddraw_private.h:79

◆ ddraw4_EnumSurfaces()

static HRESULT WINAPI ddraw4_EnumSurfaces ( IDirectDraw4 *  iface,
DWORD  flags,
DDSURFACEDESC2 surface_desc,
void context,
LPDDENUMSURFACESCALLBACK2  callback 
)
static

Definition at line 3327 of file ddraw.c.

3329 {
3330  struct ddraw *ddraw = impl_from_IDirectDraw4(iface);
3331  struct surfacescallback2_context cbcontext;
3332