2001-01-04 23:44:55 +01:00
|
|
|
/* Direct Draw Thunks and old vtables
|
|
|
|
* Copyright 2000 TransGaming Technologies Inc.
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2001-01-04 23:44:55 +01:00
|
|
|
*/
|
2006-06-09 19:36:12 +02:00
|
|
|
|
|
|
|
#include "config.h"
|
2006-07-10 16:06:33 +02:00
|
|
|
#include "wine/port.h"
|
2006-06-09 19:36:12 +02:00
|
|
|
|
2006-07-10 16:06:33 +02:00
|
|
|
#include <assert.h>
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
2006-07-10 16:06:33 +02:00
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#define COBJMACROS
|
|
|
|
#define NONAMELESSUNION
|
2003-09-06 01:08:26 +02:00
|
|
|
|
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
2006-07-10 16:06:33 +02:00
|
|
|
#include "winerror.h"
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "wingdi.h"
|
2006-07-10 16:06:33 +02:00
|
|
|
#include "wine/exception.h"
|
|
|
|
|
2001-01-25 23:23:08 +01:00
|
|
|
#include "ddraw.h"
|
2006-07-10 16:06:33 +02:00
|
|
|
#include "d3d.h"
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
#include "ddraw_private.h"
|
2006-07-10 16:06:33 +02:00
|
|
|
#include "wine/debug.h"
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(ddraw_thunk);
|
|
|
|
WINE_DECLARE_DEBUG_CHANNEL(ddraw);
|
2001-01-04 23:44:55 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_QueryInterface(LPDIRECTDRAW This, REFIID iid, LPVOID *ppObj)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_QueryInterface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
iid, ppObj);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_QueryInterface(LPDIRECTDRAW2 This, REFIID iid, LPVOID *ppObj)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_QueryInterface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
iid, ppObj);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_QueryInterface(LPDIRECTDRAW3 This, REFIID iid, LPVOID *ppObj)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_QueryInterface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
iid, ppObj);
|
|
|
|
}
|
2001-01-04 23:44:55 +01:00
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_QueryInterface(LPDIRECTDRAW4 This, REFIID iid, LPVOID *ppObj)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_QueryInterface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
iid, ppObj);
|
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDrawImpl_AddRef(LPDIRECTDRAW iface)
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
2006-07-10 16:06:33 +02:00
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw, iface);
|
|
|
|
ULONG ref = InterlockedIncrement(&This->ref1);
|
|
|
|
|
2006-10-10 19:23:27 +02:00
|
|
|
TRACE("(%p) : incrementing IDirectDraw refcount from %u.\n", This, ref -1);
|
2006-07-10 16:06:33 +02:00
|
|
|
|
|
|
|
if(ref == 1) InterlockedIncrement(&This->numIfaces);
|
|
|
|
|
|
|
|
return ref;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw2Impl_AddRef(LPDIRECTDRAW2 iface)
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
2006-07-10 16:06:33 +02:00
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw2, iface);
|
|
|
|
ULONG ref = InterlockedIncrement(&This->ref2);
|
|
|
|
|
2006-10-10 19:23:27 +02:00
|
|
|
TRACE("(%p) : incrementing IDirectDraw2 refcount from %u.\n", This, ref -1);
|
2006-07-10 16:06:33 +02:00
|
|
|
|
|
|
|
if(ref == 1) InterlockedIncrement(&This->numIfaces);
|
|
|
|
|
|
|
|
return ref;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static ULONG WINAPI
|
|
|
|
IDirectDraw3Impl_AddRef(LPDIRECTDRAW3 iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw3, iface);
|
2006-12-15 17:15:28 +01:00
|
|
|
ULONG ref = InterlockedIncrement(&This->ref3);
|
2006-12-14 02:14:35 +01:00
|
|
|
|
2006-12-15 17:15:28 +01:00
|
|
|
TRACE("(%p) : incrementing IDirectDraw3 refcount from %u.\n", This, ref -1);
|
2006-12-14 02:14:35 +01:00
|
|
|
|
|
|
|
if(ref == 1) InterlockedIncrement(&This->numIfaces);
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static ULONG WINAPI
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw4Impl_AddRef(LPDIRECTDRAW4 iface)
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
2006-07-10 16:06:33 +02:00
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw4, iface);
|
|
|
|
ULONG ref = InterlockedIncrement(&This->ref4);
|
|
|
|
|
2006-10-10 19:23:27 +02:00
|
|
|
TRACE("(%p) : incrementing IDirectDraw4 refcount from %u.\n", This, ref -1);
|
2006-07-10 16:06:33 +02:00
|
|
|
|
|
|
|
if(ref == 1) InterlockedIncrement(&This->numIfaces);
|
|
|
|
|
|
|
|
return ref;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDrawImpl_Release(LPDIRECTDRAW iface)
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
2006-07-10 16:06:33 +02:00
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw, iface);
|
|
|
|
ULONG ref = InterlockedDecrement(&This->ref1);
|
|
|
|
|
2006-10-10 19:23:27 +02:00
|
|
|
TRACE_(ddraw)("(%p)->() decrementing IDirectDraw refcount from %u.\n", This, ref +1);
|
2006-07-10 16:06:33 +02:00
|
|
|
|
|
|
|
if(ref == 0)
|
|
|
|
{
|
|
|
|
ULONG ifacecount = InterlockedDecrement(&This->numIfaces);
|
|
|
|
if(ifacecount == 0) IDirectDrawImpl_Destroy(This);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ref;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static ULONG WINAPI
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw2Impl_Release(LPDIRECTDRAW2 iface)
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
2006-07-10 16:06:33 +02:00
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw2, iface);
|
|
|
|
ULONG ref = InterlockedDecrement(&This->ref2);
|
|
|
|
|
2006-10-10 19:23:27 +02:00
|
|
|
TRACE_(ddraw)("(%p)->() decrementing IDirectDraw2 refcount from %u.\n", This, ref +1);
|
2006-07-10 16:06:33 +02:00
|
|
|
|
|
|
|
if(ref == 0)
|
|
|
|
{
|
|
|
|
ULONG ifacecount = InterlockedDecrement(&This->numIfaces);
|
|
|
|
if(ifacecount == 0) IDirectDrawImpl_Destroy(This);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ref;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static ULONG WINAPI
|
|
|
|
IDirectDraw3Impl_Release(LPDIRECTDRAW3 iface)
|
|
|
|
{
|
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw3, iface);
|
2006-12-15 17:15:28 +01:00
|
|
|
ULONG ref = InterlockedDecrement(&This->ref3);
|
2006-12-14 02:14:35 +01:00
|
|
|
|
2006-12-15 17:15:28 +01:00
|
|
|
TRACE_(ddraw)("(%p)->() decrementing IDirectDraw3 refcount from %u.\n", This, ref +1);
|
2006-12-14 02:14:35 +01:00
|
|
|
|
|
|
|
if(ref == 0)
|
|
|
|
{
|
|
|
|
ULONG ifacecount = InterlockedDecrement(&This->numIfaces);
|
|
|
|
if(ifacecount == 0) IDirectDrawImpl_Destroy(This);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ref;
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static ULONG WINAPI
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw4Impl_Release(LPDIRECTDRAW4 iface)
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
2006-07-10 16:06:33 +02:00
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw4, iface);
|
|
|
|
ULONG ref = InterlockedDecrement(&This->ref4);
|
|
|
|
|
2006-10-10 19:23:27 +02:00
|
|
|
TRACE_(ddraw)("(%p)->() decrementing IDirectDraw4 refcount from %u.\n", This, ref +1);
|
2006-07-10 16:06:33 +02:00
|
|
|
|
|
|
|
if(ref == 0)
|
|
|
|
{
|
|
|
|
ULONG ifacecount = InterlockedDecrement(&This->numIfaces);
|
|
|
|
if(ifacecount == 0) IDirectDrawImpl_Destroy(This);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ref;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_Compact(LPDIRECTDRAW This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_Compact(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw, IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_Compact(LPDIRECTDRAW2 This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_Compact(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2, IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_Compact(LPDIRECTDRAW3 This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_Compact(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3, IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_Compact(LPDIRECTDRAW4 This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_Compact(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4, IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_CreateClipper(LPDIRECTDRAW This, DWORD dwFlags,
|
|
|
|
LPDIRECTDRAWCLIPPER *ppClipper,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_CreateClipper(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, ppClipper, pUnkOuter);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_CreateClipper(LPDIRECTDRAW2 This, DWORD dwFlags,
|
|
|
|
LPDIRECTDRAWCLIPPER *ppClipper,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_CreateClipper(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, ppClipper, pUnkOuter);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_CreateClipper(LPDIRECTDRAW3 This, DWORD dwFlags,
|
|
|
|
LPDIRECTDRAWCLIPPER *ppClipper,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_CreateClipper(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, ppClipper, pUnkOuter);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_CreateClipper(LPDIRECTDRAW4 This, DWORD dwFlags,
|
|
|
|
LPDIRECTDRAWCLIPPER *ppClipper,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_CreateClipper(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, ppClipper, pUnkOuter);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_CreatePalette(LPDIRECTDRAW This, DWORD dwFlags,
|
|
|
|
LPPALETTEENTRY pEntries,
|
|
|
|
LPDIRECTDRAWPALETTE *ppPalette,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
2006-07-10 16:06:33 +02:00
|
|
|
HRESULT hr;
|
|
|
|
hr = IDirectDraw7_CreatePalette(COM_INTERFACE_CAST(IDirectDrawImpl,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, pEntries, ppPalette, pUnkOuter);
|
2006-07-10 16:06:33 +02:00
|
|
|
if(SUCCEEDED(hr) && *ppPalette)
|
|
|
|
{
|
2006-07-10 10:53:11 +02:00
|
|
|
IDirectDrawPaletteImpl *impl = ICOM_OBJECT(IDirectDrawPaletteImpl, IDirectDrawPalette, *ppPalette);
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
2006-07-10 10:53:11 +02:00
|
|
|
impl->ifaceToRelease = NULL;
|
|
|
|
|
2006-07-10 16:06:33 +02:00
|
|
|
}
|
|
|
|
return hr;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_CreatePalette(LPDIRECTDRAW2 This, DWORD dwFlags,
|
|
|
|
LPPALETTEENTRY pEntries,
|
|
|
|
LPDIRECTDRAWPALETTE *ppPalette,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
2006-07-10 16:06:33 +02:00
|
|
|
HRESULT hr;
|
2006-07-10 10:53:11 +02:00
|
|
|
hr = IDirectDraw7_CreatePalette(COM_INTERFACE_CAST(IDirectDrawImpl,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, pEntries, ppPalette, pUnkOuter);
|
2006-07-10 16:06:33 +02:00
|
|
|
if(SUCCEEDED(hr) && *ppPalette)
|
|
|
|
{
|
2006-07-10 10:53:11 +02:00
|
|
|
IDirectDrawPaletteImpl *impl = ICOM_OBJECT(IDirectDrawPaletteImpl, IDirectDrawPalette, *ppPalette);
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl,
|
2006-07-10 10:53:11 +02:00
|
|
|
IDirectDraw2,
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
2006-07-10 10:53:11 +02:00
|
|
|
impl->ifaceToRelease = NULL;
|
2006-07-10 16:06:33 +02:00
|
|
|
}
|
2006-07-10 10:53:11 +02:00
|
|
|
return hr;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_CreatePalette(LPDIRECTDRAW3 This, DWORD dwFlags,
|
|
|
|
LPPALETTEENTRY pEntries,
|
|
|
|
LPDIRECTDRAWPALETTE *ppPalette,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
|
|
|
HRESULT hr;
|
|
|
|
hr = IDirectDraw7_CreatePalette(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, pEntries, ppPalette, pUnkOuter);
|
|
|
|
if(SUCCEEDED(hr) && *ppPalette)
|
|
|
|
{
|
|
|
|
IDirectDrawPaletteImpl *impl = ICOM_OBJECT(IDirectDrawPaletteImpl, IDirectDrawPalette, *ppPalette);
|
|
|
|
IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
IDirectDraw4_AddRef(This);
|
|
|
|
impl->ifaceToRelease = (IUnknown *) This;
|
|
|
|
}
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_CreatePalette(LPDIRECTDRAW4 This, DWORD dwFlags,
|
|
|
|
LPPALETTEENTRY pEntries,
|
|
|
|
LPDIRECTDRAWPALETTE *ppPalette,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
2006-07-10 16:06:33 +02:00
|
|
|
HRESULT hr;
|
2006-07-10 10:53:11 +02:00
|
|
|
hr = IDirectDraw7_CreatePalette(COM_INTERFACE_CAST(IDirectDrawImpl,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, pEntries, ppPalette, pUnkOuter);
|
2006-07-10 16:06:33 +02:00
|
|
|
if(SUCCEEDED(hr) && *ppPalette)
|
|
|
|
{
|
2006-07-10 10:53:11 +02:00
|
|
|
IDirectDrawPaletteImpl *impl = ICOM_OBJECT(IDirectDrawPaletteImpl, IDirectDrawPalette, *ppPalette);
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl,
|
2006-07-10 10:53:11 +02:00
|
|
|
IDirectDraw4,
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
2006-07-10 10:53:11 +02:00
|
|
|
IDirectDraw4_AddRef(This);
|
|
|
|
impl->ifaceToRelease = (IUnknown *) This;
|
2006-07-10 16:06:33 +02:00
|
|
|
}
|
2006-07-10 10:53:11 +02:00
|
|
|
return hr;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
2008-12-25 02:01:02 +01:00
|
|
|
/* Must set all attached surfaces (e.g. mipmaps) versions as well */
|
|
|
|
static void set_surf_version(IDirectDrawSurfaceImpl *surf, int version)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
TRACE("%p->version(%d) = %d\n", surf, surf->version, version);
|
|
|
|
surf->version = version;
|
|
|
|
for(i = 0; i < MAX_COMPLEX_ATTACHED; i++)
|
|
|
|
{
|
|
|
|
if(!surf->complex_array[i]) break;
|
|
|
|
set_surf_version(surf->complex_array[i], version);
|
|
|
|
}
|
|
|
|
while( (surf = surf->next_attached) )
|
|
|
|
{
|
|
|
|
set_surf_version(surf, version);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_CreateSurface(LPDIRECTDRAW This, LPDDSURFACEDESC pSDesc,
|
|
|
|
LPDIRECTDRAWSURFACE *ppSurface,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
|
|
|
LPDIRECTDRAWSURFACE7 pSurface7;
|
2006-06-09 19:36:12 +02:00
|
|
|
IDirectDrawSurfaceImpl *impl;
|
2001-01-04 23:44:55 +01:00
|
|
|
HRESULT hr;
|
|
|
|
|
2007-05-04 18:31:14 +02:00
|
|
|
/* Remove front buffer flag, this causes failure in v7, and its added to normal
|
|
|
|
* primaries anyway
|
|
|
|
*/
|
|
|
|
pSDesc->ddsCaps.dwCaps &= ~DDSCAPS_FRONTBUFFER;
|
2002-06-01 01:06:46 +02:00
|
|
|
/* the LPDDSURFACEDESC -> LPDDSURFACEDESC2 conversion should be ok,
|
2001-01-13 00:18:22 +01:00
|
|
|
* since the data layout is the same */
|
2001-01-04 23:44:55 +01:00
|
|
|
hr = IDirectDraw7_CreateSurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
2001-01-13 00:18:22 +01:00
|
|
|
(LPDDSURFACEDESC2)pSDesc, &pSurface7, pUnkOuter);
|
2001-01-04 23:44:55 +01:00
|
|
|
|
2001-01-13 00:18:22 +01:00
|
|
|
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
|
|
|
* IDirectDrawSurface vtable layout at the beginning */
|
|
|
|
*ppSurface = (LPDIRECTDRAWSURFACE) COM_INTERFACE_CAST(IDirectDrawSurfaceImpl,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDrawSurface7, IDirectDrawSurface3,
|
|
|
|
pSurface7);
|
|
|
|
|
2006-06-09 19:36:12 +02:00
|
|
|
impl = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, pSurface7);
|
2006-07-10 16:06:33 +02:00
|
|
|
if(SUCCEEDED(hr) && impl)
|
2006-06-09 19:36:12 +02:00
|
|
|
{
|
2008-12-25 02:01:02 +01:00
|
|
|
set_surf_version(impl, 1);
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
2007-02-16 19:08:09 +01:00
|
|
|
impl->ifaceToRelease = NULL;
|
2006-06-09 19:36:12 +02:00
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_CreateSurface(LPDIRECTDRAW2 This, LPDDSURFACEDESC pSDesc,
|
|
|
|
LPDIRECTDRAWSURFACE *ppSurface,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
|
|
|
LPDIRECTDRAWSURFACE7 pSurface7;
|
2006-06-09 19:36:12 +02:00
|
|
|
IDirectDrawSurfaceImpl *impl;
|
2001-01-04 23:44:55 +01:00
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
hr = IDirectDraw7_CreateSurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
2001-01-15 21:20:50 +01:00
|
|
|
IDirectDraw2,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
2001-01-13 00:18:22 +01:00
|
|
|
(LPDDSURFACEDESC2)pSDesc, &pSurface7, pUnkOuter);
|
2001-01-04 23:44:55 +01:00
|
|
|
|
2001-01-13 00:18:22 +01:00
|
|
|
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
|
|
|
* IDirectDrawSurface vtable layout at the beginning */
|
|
|
|
*ppSurface = (LPDIRECTDRAWSURFACE)COM_INTERFACE_CAST(IDirectDrawSurfaceImpl,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDrawSurface7, IDirectDrawSurface3,
|
|
|
|
pSurface7);
|
|
|
|
|
2006-06-09 19:36:12 +02:00
|
|
|
impl = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, pSurface7);
|
2006-07-10 16:06:33 +02:00
|
|
|
if(SUCCEEDED(hr) && impl)
|
2006-06-09 19:36:12 +02:00
|
|
|
{
|
2008-12-25 02:01:02 +01:00
|
|
|
set_surf_version(impl, 2);
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
2007-02-16 19:08:09 +01:00
|
|
|
impl->ifaceToRelease = NULL;
|
2006-06-09 19:36:12 +02:00
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_CreateSurface(LPDIRECTDRAW3 This, LPDDSURFACEDESC pSDesc,
|
|
|
|
LPDIRECTDRAWSURFACE *ppSurface,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
|
|
|
LPDIRECTDRAWSURFACE7 pSurface7;
|
|
|
|
IDirectDrawSurfaceImpl *impl;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
hr = IDirectDraw7_CreateSurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
(LPDDSURFACEDESC2)pSDesc, &pSurface7, pUnkOuter);
|
|
|
|
|
|
|
|
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
|
|
|
* IDirectDrawSurface vtable layout at the beginning */
|
|
|
|
*ppSurface = (LPDIRECTDRAWSURFACE)COM_INTERFACE_CAST(IDirectDrawSurfaceImpl,
|
|
|
|
IDirectDrawSurface7, IDirectDrawSurface3,
|
|
|
|
pSurface7);
|
|
|
|
|
|
|
|
impl = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, pSurface7);
|
|
|
|
if(SUCCEEDED(hr) && impl)
|
|
|
|
{
|
2008-12-25 02:01:02 +01:00
|
|
|
set_surf_version(impl, 3);
|
2006-12-14 02:14:35 +01:00
|
|
|
IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
IDirectDraw3_AddRef(This);
|
|
|
|
impl->ifaceToRelease = (IUnknown *) This;
|
|
|
|
}
|
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_CreateSurface(LPDIRECTDRAW4 This, LPDDSURFACEDESC2 pSDesc,
|
|
|
|
LPDIRECTDRAWSURFACE4 *ppSurface,
|
|
|
|
IUnknown *pUnkOuter)
|
|
|
|
{
|
2006-06-09 19:36:12 +02:00
|
|
|
HRESULT hr;
|
|
|
|
IDirectDrawSurfaceImpl *impl;
|
|
|
|
|
|
|
|
hr = IDirectDraw7_CreateSurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
pSDesc,
|
|
|
|
(LPDIRECTDRAWSURFACE7 *)ppSurface,
|
|
|
|
pUnkOuter);
|
|
|
|
impl = ICOM_OBJECT(IDirectDrawSurfaceImpl, IDirectDrawSurface7, *ppSurface);
|
2006-07-10 16:06:33 +02:00
|
|
|
if(SUCCEEDED(hr) && impl)
|
2006-06-09 19:36:12 +02:00
|
|
|
{
|
2008-12-25 02:01:02 +01:00
|
|
|
set_surf_version(impl, 4);
|
2006-07-10 16:06:33 +02:00
|
|
|
IDirectDraw7_Release(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
IDirectDraw4_AddRef(This);
|
|
|
|
impl->ifaceToRelease = (IUnknown *) This;
|
2006-06-09 19:36:12 +02:00
|
|
|
}
|
|
|
|
return hr;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_DuplicateSurface(LPDIRECTDRAW This, LPDIRECTDRAWSURFACE pSrc,
|
|
|
|
LPDIRECTDRAWSURFACE *ppDst)
|
|
|
|
{
|
|
|
|
LPDIRECTDRAWSURFACE7 pDst7;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
hr = IDirectDraw7_DuplicateSurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
COM_INTERFACE_CAST(IDirectDrawSurfaceImpl,
|
|
|
|
IDirectDrawSurface3,
|
|
|
|
IDirectDrawSurface7,
|
|
|
|
pSrc),
|
|
|
|
&pDst7);
|
|
|
|
|
2001-01-13 00:18:22 +01:00
|
|
|
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
|
|
|
* IDirectDrawSurface vtable layout at the beginning */
|
|
|
|
*ppDst = (LPDIRECTDRAWSURFACE)COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, IDirectDrawSurface7,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDrawSurface3, pDst7);
|
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_DuplicateSurface(LPDIRECTDRAW2 This, LPDIRECTDRAWSURFACE pSrc,
|
|
|
|
LPDIRECTDRAWSURFACE *ppDst)
|
|
|
|
{
|
|
|
|
LPDIRECTDRAWSURFACE7 pDst7;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
hr = IDirectDraw7_DuplicateSurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
COM_INTERFACE_CAST(IDirectDrawSurfaceImpl,
|
|
|
|
IDirectDrawSurface3,
|
|
|
|
IDirectDrawSurface7,
|
|
|
|
pSrc),
|
|
|
|
&pDst7);
|
|
|
|
|
2001-01-13 00:18:22 +01:00
|
|
|
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
|
|
|
* IDirectDrawSurface vtable layout at the beginning */
|
|
|
|
*ppDst = (LPDIRECTDRAWSURFACE)COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, IDirectDrawSurface7,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDrawSurface3, pDst7);
|
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_DuplicateSurface(LPDIRECTDRAW3 This, LPDIRECTDRAWSURFACE pSrc,
|
|
|
|
LPDIRECTDRAWSURFACE *ppDst)
|
|
|
|
{
|
|
|
|
LPDIRECTDRAWSURFACE7 pDst7;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
hr = IDirectDraw7_DuplicateSurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
COM_INTERFACE_CAST(IDirectDrawSurfaceImpl,
|
|
|
|
IDirectDrawSurface3,
|
|
|
|
IDirectDrawSurface7,
|
|
|
|
pSrc),
|
|
|
|
&pDst7);
|
|
|
|
|
|
|
|
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
|
|
|
* IDirectDrawSurface vtable layout at the beginning */
|
|
|
|
*ppDst = (LPDIRECTDRAWSURFACE)COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, IDirectDrawSurface7,
|
|
|
|
IDirectDrawSurface3, pDst7);
|
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_DuplicateSurface(LPDIRECTDRAW4 This,
|
|
|
|
LPDIRECTDRAWSURFACE4 pSrc,
|
|
|
|
LPDIRECTDRAWSURFACE4 *ppDst)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_DuplicateSurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
(LPDIRECTDRAWSURFACE7)pSrc,
|
|
|
|
(LPDIRECTDRAWSURFACE7 *)ppDst);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct displaymodescallback_context
|
|
|
|
{
|
|
|
|
LPDDENUMMODESCALLBACK func;
|
|
|
|
LPVOID context;
|
|
|
|
};
|
|
|
|
|
|
|
|
static HRESULT CALLBACK
|
|
|
|
EnumDisplayModesCallbackThunk(LPDDSURFACEDESC2 pDDSD2, LPVOID context)
|
|
|
|
{
|
2002-07-22 22:37:01 +02:00
|
|
|
DDSURFACEDESC DDSD;
|
2001-01-04 23:44:55 +01:00
|
|
|
struct displaymodescallback_context *cbcontext = context;
|
|
|
|
|
2003-06-18 21:45:22 +02:00
|
|
|
memcpy(&DDSD,pDDSD2,sizeof(DDSD));
|
|
|
|
DDSD.dwSize = sizeof(DDSD);
|
2002-07-22 22:37:01 +02:00
|
|
|
|
|
|
|
return cbcontext->func(&DDSD, cbcontext->context);
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_EnumDisplayModes(LPDIRECTDRAW This, DWORD dwFlags,
|
|
|
|
LPDDSURFACEDESC pDDSD, LPVOID context,
|
|
|
|
LPDDENUMMODESCALLBACK cb)
|
|
|
|
{
|
2002-07-03 23:06:58 +02:00
|
|
|
struct displaymodescallback_context cbcontext;
|
|
|
|
|
|
|
|
cbcontext.func = cb;
|
|
|
|
cbcontext.context = context;
|
2001-01-04 23:44:55 +01:00
|
|
|
|
|
|
|
return IDirectDraw7_EnumDisplayModes(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
2001-01-13 00:18:22 +01:00
|
|
|
dwFlags, (LPDDSURFACEDESC2)pDDSD, &cbcontext,
|
2001-01-04 23:44:55 +01:00
|
|
|
EnumDisplayModesCallbackThunk);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_EnumDisplayModes(LPDIRECTDRAW2 This, DWORD dwFlags,
|
|
|
|
LPDDSURFACEDESC pDDSD, LPVOID context,
|
|
|
|
LPDDENUMMODESCALLBACK cb)
|
|
|
|
{
|
2002-07-03 23:06:58 +02:00
|
|
|
struct displaymodescallback_context cbcontext;
|
|
|
|
|
|
|
|
cbcontext.func = cb;
|
|
|
|
cbcontext.context = context;
|
2001-01-04 23:44:55 +01:00
|
|
|
|
|
|
|
return IDirectDraw7_EnumDisplayModes(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
2001-01-13 00:18:22 +01:00
|
|
|
dwFlags, (LPDDSURFACEDESC2)pDDSD, &cbcontext,
|
2001-01-04 23:44:55 +01:00
|
|
|
EnumDisplayModesCallbackThunk);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_EnumDisplayModes(LPDIRECTDRAW3 This, DWORD dwFlags,
|
|
|
|
LPDDSURFACEDESC pDDSD, LPVOID context,
|
|
|
|
LPDDENUMMODESCALLBACK cb)
|
|
|
|
{
|
|
|
|
struct displaymodescallback_context cbcontext;
|
|
|
|
|
|
|
|
cbcontext.func = cb;
|
|
|
|
cbcontext.context = context;
|
|
|
|
|
|
|
|
return IDirectDraw7_EnumDisplayModes(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, (LPDDSURFACEDESC2)pDDSD, &cbcontext,
|
|
|
|
EnumDisplayModesCallbackThunk);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_EnumDisplayModes(LPDIRECTDRAW4 This, DWORD dwFlags,
|
|
|
|
LPDDSURFACEDESC2 pDDSD, LPVOID context,
|
|
|
|
LPDDENUMMODESCALLBACK2 cb)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_EnumDisplayModes(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, pDDSD, context, cb);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct surfacescallback_context
|
|
|
|
{
|
|
|
|
LPDDENUMSURFACESCALLBACK func;
|
|
|
|
LPVOID context;
|
|
|
|
};
|
|
|
|
|
|
|
|
static HRESULT CALLBACK
|
|
|
|
EnumSurfacesCallbackThunk(LPDIRECTDRAWSURFACE7 pSurf, LPDDSURFACEDESC2 pDDSD,
|
|
|
|
LPVOID context)
|
|
|
|
{
|
|
|
|
struct surfacescallback_context *cbcontext = context;
|
|
|
|
|
2001-01-13 00:18:22 +01:00
|
|
|
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
|
|
|
* IDirectDrawSurface vtable layout at the beginning */
|
2002-06-01 01:06:46 +02:00
|
|
|
return cbcontext->func((LPDIRECTDRAWSURFACE)
|
2001-01-13 00:18:22 +01:00
|
|
|
COM_INTERFACE_CAST(IDirectDrawSurfaceImpl,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDrawSurface7,
|
|
|
|
IDirectDrawSurface3, pSurf),
|
|
|
|
(LPDDSURFACEDESC)pDDSD, cbcontext->context);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_EnumSurfaces(LPDIRECTDRAW This, DWORD dwFlags,
|
|
|
|
LPDDSURFACEDESC pDDSD, LPVOID context,
|
|
|
|
LPDDENUMSURFACESCALLBACK cb)
|
|
|
|
{
|
2002-07-03 23:06:58 +02:00
|
|
|
struct surfacescallback_context cbcontext;
|
|
|
|
|
|
|
|
cbcontext.func = cb;
|
|
|
|
cbcontext.context = context;
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
return IDirectDraw7_EnumSurfaces(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
dwFlags, (LPDDSURFACEDESC2)pDDSD,
|
|
|
|
&cbcontext, EnumSurfacesCallbackThunk);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_EnumSurfaces(LPDIRECTDRAW2 This, DWORD dwFlags,
|
|
|
|
LPDDSURFACEDESC pDDSD, LPVOID context,
|
|
|
|
LPDDENUMSURFACESCALLBACK cb)
|
|
|
|
{
|
2002-07-03 23:06:58 +02:00
|
|
|
struct surfacescallback_context cbcontext;
|
|
|
|
|
|
|
|
cbcontext.func = cb;
|
|
|
|
cbcontext.context = context;
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
return IDirectDraw7_EnumSurfaces(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
dwFlags, (LPDDSURFACEDESC2)pDDSD,
|
|
|
|
&cbcontext, EnumSurfacesCallbackThunk);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_EnumSurfaces(LPDIRECTDRAW3 This, DWORD dwFlags,
|
|
|
|
LPDDSURFACEDESC pDDSD, LPVOID context,
|
|
|
|
LPDDENUMSURFACESCALLBACK cb)
|
|
|
|
{
|
|
|
|
struct surfacescallback_context cbcontext;
|
|
|
|
|
|
|
|
cbcontext.func = cb;
|
|
|
|
cbcontext.context = context;
|
|
|
|
|
|
|
|
return IDirectDraw7_EnumSurfaces(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
dwFlags, (LPDDSURFACEDESC2)pDDSD,
|
|
|
|
&cbcontext, EnumSurfacesCallbackThunk);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_EnumSurfaces(LPDIRECTDRAW4 This, DWORD dwFlags,
|
|
|
|
LPDDSURFACEDESC2 pDDSD, LPVOID context,
|
|
|
|
LPDDENUMSURFACESCALLBACK2 cb)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_EnumSurfaces(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
dwFlags, pDDSD, context,
|
|
|
|
(LPDDENUMSURFACESCALLBACK7)cb);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_FlipToGDISurface(LPDIRECTDRAW This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_FlipToGDISurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_FlipToGDISurface(LPDIRECTDRAW2 This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_FlipToGDISurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_FlipToGDISurface(LPDIRECTDRAW3 This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_FlipToGDISurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_FlipToGDISurface(LPDIRECTDRAW4 This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_FlipToGDISurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_GetCaps(LPDIRECTDRAW This, LPDDCAPS pDDC1, LPDDCAPS pDDC2)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetCaps(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw, IDirectDraw7,
|
|
|
|
This), pDDC1, pDDC2);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_GetCaps(LPDIRECTDRAW2 This, LPDDCAPS pDDC1, LPDDCAPS pDDC2)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetCaps(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2, IDirectDraw7,
|
|
|
|
This), pDDC1, pDDC2);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_GetCaps(LPDIRECTDRAW3 This, LPDDCAPS pDDC1, LPDDCAPS pDDC2)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetCaps(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3, IDirectDraw7,
|
|
|
|
This), pDDC1, pDDC2);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_GetCaps(LPDIRECTDRAW4 This, LPDDCAPS pDDC1, LPDDCAPS pDDC2)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetCaps(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4, IDirectDraw7,
|
|
|
|
This), pDDC1, pDDC2);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_GetDisplayMode(LPDIRECTDRAW This, LPDDSURFACEDESC pDDSD)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
(LPDDSURFACEDESC2)pDDSD);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_GetDisplayMode(LPDIRECTDRAW2 This, LPDDSURFACEDESC pDDSD)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
(LPDDSURFACEDESC2)pDDSD);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_GetDisplayMode(LPDIRECTDRAW3 This, LPDDSURFACEDESC pDDSD)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
(LPDDSURFACEDESC2)pDDSD);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_GetDisplayMode(LPDIRECTDRAW4 This, LPDDSURFACEDESC2 pDDSD)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7, This),
|
|
|
|
pDDSD);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_GetFourCCCodes(LPDIRECTDRAW This, LPDWORD lpNumCodes,
|
|
|
|
LPDWORD lpCodes)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetFourCCCodes(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
lpNumCodes, lpCodes);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_GetFourCCCodes(LPDIRECTDRAW2 This, LPDWORD lpNumCodes,
|
|
|
|
LPDWORD lpCodes)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetFourCCCodes(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
lpNumCodes, lpCodes);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_GetFourCCCodes(LPDIRECTDRAW3 This, LPDWORD lpNumCodes,
|
|
|
|
LPDWORD lpCodes)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetFourCCCodes(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
lpNumCodes, lpCodes);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_GetFourCCCodes(LPDIRECTDRAW4 This, LPDWORD lpNumCodes,
|
|
|
|
LPDWORD lpCodes)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetFourCCCodes(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
lpNumCodes, lpCodes);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_GetGDISurface(LPDIRECTDRAW This, LPDIRECTDRAWSURFACE *ppSurf)
|
|
|
|
{
|
|
|
|
LPDIRECTDRAWSURFACE7 pSurf7;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
hr = IDirectDraw7_GetGDISurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This), &pSurf7);
|
|
|
|
|
2001-01-13 00:18:22 +01:00
|
|
|
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
|
|
|
* IDirectDrawSurface vtable layout at the beginning */
|
|
|
|
*ppSurf = (LPDIRECTDRAWSURFACE)COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, IDirectDrawSurface7,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDrawSurface3, pSurf7);
|
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_GetGDISurface(LPDIRECTDRAW2 This, LPDIRECTDRAWSURFACE *ppSurf)
|
|
|
|
{
|
|
|
|
LPDIRECTDRAWSURFACE7 pSurf7;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
hr = IDirectDraw7_GetGDISurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This), &pSurf7);
|
|
|
|
|
2001-01-13 00:18:22 +01:00
|
|
|
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
|
|
|
* IDirectDrawSurface vtable layout at the beginning */
|
|
|
|
*ppSurf = (LPDIRECTDRAWSURFACE)COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, IDirectDrawSurface7,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDrawSurface3, pSurf7);
|
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_GetGDISurface(LPDIRECTDRAW3 This, LPDIRECTDRAWSURFACE *ppSurf)
|
|
|
|
{
|
|
|
|
LPDIRECTDRAWSURFACE7 pSurf7;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
hr = IDirectDraw7_GetGDISurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This), &pSurf7);
|
|
|
|
|
|
|
|
/* This coercion is safe, since the IDirectDrawSurface3 vtable has the
|
|
|
|
* IDirectDrawSurface vtable layout at the beginning */
|
|
|
|
*ppSurf = (LPDIRECTDRAWSURFACE)COM_INTERFACE_CAST(IDirectDrawSurfaceImpl, IDirectDrawSurface7,
|
|
|
|
IDirectDrawSurface3, pSurf7);
|
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_GetGDISurface(LPDIRECTDRAW4 This,
|
|
|
|
LPDIRECTDRAWSURFACE4 *ppSurf)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetGDISurface(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
(LPDIRECTDRAWSURFACE7 *)ppSurf);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_GetMonitorFrequency(LPDIRECTDRAW This, LPDWORD pdwFreq)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetMonitorFrequency(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
pdwFreq);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_GetMonitorFrequency(LPDIRECTDRAW2 This, LPDWORD pdwFreq)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetMonitorFrequency(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
pdwFreq);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_GetMonitorFrequency(LPDIRECTDRAW3 This, LPDWORD pdwFreq)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetMonitorFrequency(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
pdwFreq);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_GetMonitorFrequency(LPDIRECTDRAW4 This, LPDWORD pdwFreq)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetMonitorFrequency(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
pdwFreq);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_GetScanLine(LPDIRECTDRAW This, LPDWORD pdwLine)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetScanLine(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This), pdwLine);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_GetScanLine(LPDIRECTDRAW2 This, LPDWORD pdwLine)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetScanLine(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This), pdwLine);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_GetScanLine(LPDIRECTDRAW3 This, LPDWORD pdwLine)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetScanLine(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This), pdwLine);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_GetScanLine(LPDIRECTDRAW4 This, LPDWORD pdwLine)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetScanLine(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This), pdwLine);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_GetVerticalBlankStatus(LPDIRECTDRAW This, LPBOOL lpbIsInVB)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetVerticalBlankStatus(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
lpbIsInVB);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_GetVerticalBlankStatus(LPDIRECTDRAW2 This, LPBOOL lpbIsInVB)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetVerticalBlankStatus(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
lpbIsInVB);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_GetVerticalBlankStatus(LPDIRECTDRAW3 This, LPBOOL lpbIsInVB)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetVerticalBlankStatus(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
lpbIsInVB);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_GetVerticalBlankStatus(LPDIRECTDRAW4 This, LPBOOL lpbIsInVB)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetVerticalBlankStatus(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
lpbIsInVB);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
2003-01-13 19:30:47 +01:00
|
|
|
IDirectDrawImpl_Initialize(LPDIRECTDRAW iface, LPGUID pGUID)
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
2003-01-13 19:30:47 +01:00
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw, iface);
|
|
|
|
HRESULT ret_value;
|
|
|
|
|
|
|
|
ret_value = IDirectDraw7_Initialize(ICOM_INTERFACE(This, IDirectDraw7), pGUID);
|
2006-06-09 19:36:12 +02:00
|
|
|
|
2003-01-13 19:30:47 +01:00
|
|
|
return ret_value;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
2003-01-13 19:30:47 +01:00
|
|
|
IDirectDraw2Impl_Initialize(LPDIRECTDRAW2 iface, LPGUID pGUID)
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
2003-01-13 19:30:47 +01:00
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw2, iface);
|
|
|
|
HRESULT ret_value;
|
2006-06-09 19:36:12 +02:00
|
|
|
|
2003-01-13 19:30:47 +01:00
|
|
|
ret_value = IDirectDraw7_Initialize(ICOM_INTERFACE(This, IDirectDraw7), pGUID);
|
|
|
|
|
|
|
|
return ret_value;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_Initialize(LPDIRECTDRAW3 iface, LPGUID pGUID)
|
|
|
|
{
|
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw3, iface);
|
|
|
|
HRESULT ret_value;
|
|
|
|
|
|
|
|
ret_value = IDirectDraw7_Initialize(ICOM_INTERFACE(This, IDirectDraw7), pGUID);
|
|
|
|
|
|
|
|
return ret_value;
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
2003-01-13 19:30:47 +01:00
|
|
|
IDirectDraw4Impl_Initialize(LPDIRECTDRAW4 iface, LPGUID pGUID)
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
2003-01-13 19:30:47 +01:00
|
|
|
ICOM_THIS_FROM(IDirectDrawImpl, IDirectDraw4, iface);
|
|
|
|
HRESULT ret_value;
|
2006-06-09 19:36:12 +02:00
|
|
|
|
2003-01-13 19:30:47 +01:00
|
|
|
ret_value = IDirectDraw7_Initialize(ICOM_INTERFACE(This, IDirectDraw7), pGUID);
|
2006-06-09 19:36:12 +02:00
|
|
|
|
2003-01-13 19:30:47 +01:00
|
|
|
return ret_value;
|
2001-01-04 23:44:55 +01:00
|
|
|
}
|
|
|
|
|
2003-01-13 19:30:47 +01:00
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_RestoreDisplayMode(LPDIRECTDRAW This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_RestoreDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_RestoreDisplayMode(LPDIRECTDRAW2 This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_RestoreDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_RestoreDisplayMode(LPDIRECTDRAW3 This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_RestoreDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_RestoreDisplayMode(LPDIRECTDRAW4 This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_RestoreDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_SetCooperativeLevel(LPDIRECTDRAW This, HWND hWnd,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_SetCooperativeLevel(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
hWnd, dwFlags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_SetCooperativeLevel(LPDIRECTDRAW2 This, HWND hWnd,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_SetCooperativeLevel(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
hWnd, dwFlags);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_SetCooperativeLevel(LPDIRECTDRAW3 This, HWND hWnd,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_SetCooperativeLevel(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
hWnd, dwFlags);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_SetCooperativeLevel(LPDIRECTDRAW4 This, HWND hWnd,
|
|
|
|
DWORD dwFlags)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_SetCooperativeLevel(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
hWnd, dwFlags);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_SetDisplayMode(LPDIRECTDRAW This, DWORD a, DWORD b, DWORD c)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_SetDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
a, b, c, 0, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_SetDisplayMode(LPDIRECTDRAW2 This, DWORD a, DWORD b, DWORD c,
|
|
|
|
DWORD d, DWORD e)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_SetDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
a, b, c, d, e);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_SetDisplayMode(LPDIRECTDRAW3 This, DWORD a, DWORD b, DWORD c,
|
|
|
|
DWORD d, DWORD e)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_SetDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
a, b, c, d, e);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_SetDisplayMode(LPDIRECTDRAW4 This, DWORD a, DWORD b, DWORD c,
|
|
|
|
DWORD d, DWORD e)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_SetDisplayMode(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
a, b, c, d, e);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDrawImpl_WaitForVerticalBlank(LPDIRECTDRAW This, DWORD dwFlags,
|
|
|
|
HANDLE hEvent)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_WaitForVerticalBlank(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, hEvent);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_WaitForVerticalBlank(LPDIRECTDRAW2 This, DWORD dwFlags,
|
|
|
|
HANDLE hEvent)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_WaitForVerticalBlank(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, hEvent);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_WaitForVerticalBlank(LPDIRECTDRAW3 This, DWORD dwFlags,
|
|
|
|
HANDLE hEvent)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_WaitForVerticalBlank(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, hEvent);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_WaitForVerticalBlank(LPDIRECTDRAW4 This, DWORD dwFlags,
|
|
|
|
HANDLE hEvent)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_WaitForVerticalBlank(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
dwFlags, hEvent);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw2Impl_GetAvailableVidMem(LPDIRECTDRAW2 This, LPDDSCAPS pCaps,
|
|
|
|
LPDWORD pdwTotal, LPDWORD pdwFree)
|
|
|
|
{
|
|
|
|
DDSCAPS2 Caps2;
|
|
|
|
DDRAW_Convert_DDSCAPS_1_To_2(pCaps, &Caps2);
|
|
|
|
|
|
|
|
return IDirectDraw7_GetAvailableVidMem(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw2,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
&Caps2, pdwTotal, pdwFree);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_GetAvailableVidMem(LPDIRECTDRAW3 This, LPDDSCAPS pCaps,
|
|
|
|
LPDWORD pdwTotal, LPDWORD pdwFree)
|
|
|
|
{
|
|
|
|
DDSCAPS2 Caps2;
|
|
|
|
DDRAW_Convert_DDSCAPS_1_To_2(pCaps, &Caps2);
|
|
|
|
|
|
|
|
return IDirectDraw7_GetAvailableVidMem(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
&Caps2, pdwTotal, pdwFree);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_GetAvailableVidMem(LPDIRECTDRAW4 This, LPDDSCAPS2 pCaps,
|
|
|
|
LPDWORD pdwTotal, LPDWORD pdwFree)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetAvailableVidMem(COM_INTERFACE_CAST(IDirectDrawImpl,
|
2001-02-14 01:28:02 +01:00
|
|
|
IDirectDraw4,
|
2001-01-04 23:44:55 +01:00
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
pCaps, pdwTotal, pdwFree);
|
|
|
|
}
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw3Impl_GetSurfaceFromDC(LPDIRECTDRAW3 This, HDC hDC,
|
|
|
|
LPDIRECTDRAWSURFACE *pSurf)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetSurfaceFromDC(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw3,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
hDC, (LPDIRECTDRAWSURFACE7 *)pSurf);
|
|
|
|
}
|
|
|
|
|
2001-01-04 23:44:55 +01:00
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_GetSurfaceFromDC(LPDIRECTDRAW4 This, HDC hDC,
|
|
|
|
LPDIRECTDRAWSURFACE4 *pSurf)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_GetSurfaceFromDC(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
hDC, (LPDIRECTDRAWSURFACE7 *)pSurf);
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_RestoreAllSurfaces(LPDIRECTDRAW4 This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_RestoreAllSurfaces(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_TestCooperativeLevel(LPDIRECTDRAW4 This)
|
|
|
|
{
|
|
|
|
return IDirectDraw7_TestCooperativeLevel(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This));
|
|
|
|
}
|
|
|
|
|
|
|
|
static HRESULT WINAPI
|
|
|
|
IDirectDraw4Impl_GetDeviceIdentifier(LPDIRECTDRAW4 This,
|
|
|
|
LPDDDEVICEIDENTIFIER pDDDI, DWORD dwFlags)
|
|
|
|
{
|
|
|
|
DDDEVICEIDENTIFIER2 DDDI2;
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
hr = IDirectDraw7_GetDeviceIdentifier(COM_INTERFACE_CAST(IDirectDrawImpl,
|
|
|
|
IDirectDraw4,
|
|
|
|
IDirectDraw7,
|
|
|
|
This),
|
|
|
|
&DDDI2, dwFlags);
|
|
|
|
|
2001-02-14 01:28:02 +01:00
|
|
|
DDRAW_Convert_DDDEVICEIDENTIFIER_2_To_1(&DDDI2, pDDDI);
|
2001-01-04 23:44:55 +01:00
|
|
|
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2006-06-09 19:36:12 +02:00
|
|
|
const IDirectDrawVtbl IDirectDraw1_Vtbl =
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
|
|
|
IDirectDrawImpl_QueryInterface,
|
|
|
|
IDirectDrawImpl_AddRef,
|
|
|
|
IDirectDrawImpl_Release,
|
|
|
|
IDirectDrawImpl_Compact,
|
|
|
|
IDirectDrawImpl_CreateClipper,
|
|
|
|
IDirectDrawImpl_CreatePalette,
|
|
|
|
IDirectDrawImpl_CreateSurface,
|
|
|
|
IDirectDrawImpl_DuplicateSurface,
|
|
|
|
IDirectDrawImpl_EnumDisplayModes,
|
|
|
|
IDirectDrawImpl_EnumSurfaces,
|
|
|
|
IDirectDrawImpl_FlipToGDISurface,
|
|
|
|
IDirectDrawImpl_GetCaps,
|
|
|
|
IDirectDrawImpl_GetDisplayMode,
|
|
|
|
IDirectDrawImpl_GetFourCCCodes,
|
|
|
|
IDirectDrawImpl_GetGDISurface,
|
|
|
|
IDirectDrawImpl_GetMonitorFrequency,
|
|
|
|
IDirectDrawImpl_GetScanLine,
|
|
|
|
IDirectDrawImpl_GetVerticalBlankStatus,
|
|
|
|
IDirectDrawImpl_Initialize,
|
|
|
|
IDirectDrawImpl_RestoreDisplayMode,
|
|
|
|
IDirectDrawImpl_SetCooperativeLevel,
|
|
|
|
IDirectDrawImpl_SetDisplayMode,
|
|
|
|
IDirectDrawImpl_WaitForVerticalBlank,
|
|
|
|
};
|
|
|
|
|
2006-06-09 19:36:12 +02:00
|
|
|
const IDirectDraw2Vtbl IDirectDraw2_Vtbl =
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
|
|
|
IDirectDraw2Impl_QueryInterface,
|
|
|
|
IDirectDraw2Impl_AddRef,
|
|
|
|
IDirectDraw2Impl_Release,
|
|
|
|
IDirectDraw2Impl_Compact,
|
|
|
|
IDirectDraw2Impl_CreateClipper,
|
|
|
|
IDirectDraw2Impl_CreatePalette,
|
|
|
|
IDirectDraw2Impl_CreateSurface,
|
|
|
|
IDirectDraw2Impl_DuplicateSurface,
|
|
|
|
IDirectDraw2Impl_EnumDisplayModes,
|
|
|
|
IDirectDraw2Impl_EnumSurfaces,
|
|
|
|
IDirectDraw2Impl_FlipToGDISurface,
|
|
|
|
IDirectDraw2Impl_GetCaps,
|
|
|
|
IDirectDraw2Impl_GetDisplayMode,
|
|
|
|
IDirectDraw2Impl_GetFourCCCodes,
|
|
|
|
IDirectDraw2Impl_GetGDISurface,
|
|
|
|
IDirectDraw2Impl_GetMonitorFrequency,
|
|
|
|
IDirectDraw2Impl_GetScanLine,
|
|
|
|
IDirectDraw2Impl_GetVerticalBlankStatus,
|
|
|
|
IDirectDraw2Impl_Initialize,
|
|
|
|
IDirectDraw2Impl_RestoreDisplayMode,
|
|
|
|
IDirectDraw2Impl_SetCooperativeLevel,
|
|
|
|
IDirectDraw2Impl_SetDisplayMode,
|
|
|
|
IDirectDraw2Impl_WaitForVerticalBlank,
|
|
|
|
IDirectDraw2Impl_GetAvailableVidMem
|
|
|
|
};
|
|
|
|
|
2006-12-14 02:14:35 +01:00
|
|
|
const IDirectDraw3Vtbl IDirectDraw3_Vtbl =
|
|
|
|
{
|
|
|
|
IDirectDraw3Impl_QueryInterface,
|
|
|
|
IDirectDraw3Impl_AddRef,
|
|
|
|
IDirectDraw3Impl_Release,
|
|
|
|
IDirectDraw3Impl_Compact,
|
|
|
|
IDirectDraw3Impl_CreateClipper,
|
|
|
|
IDirectDraw3Impl_CreatePalette,
|
|
|
|
IDirectDraw3Impl_CreateSurface,
|
|
|
|
IDirectDraw3Impl_DuplicateSurface,
|
|
|
|
IDirectDraw3Impl_EnumDisplayModes,
|
|
|
|
IDirectDraw3Impl_EnumSurfaces,
|
|
|
|
IDirectDraw3Impl_FlipToGDISurface,
|
|
|
|
IDirectDraw3Impl_GetCaps,
|
|
|
|
IDirectDraw3Impl_GetDisplayMode,
|
|
|
|
IDirectDraw3Impl_GetFourCCCodes,
|
|
|
|
IDirectDraw3Impl_GetGDISurface,
|
|
|
|
IDirectDraw3Impl_GetMonitorFrequency,
|
|
|
|
IDirectDraw3Impl_GetScanLine,
|
|
|
|
IDirectDraw3Impl_GetVerticalBlankStatus,
|
|
|
|
IDirectDraw3Impl_Initialize,
|
|
|
|
IDirectDraw3Impl_RestoreDisplayMode,
|
|
|
|
IDirectDraw3Impl_SetCooperativeLevel,
|
|
|
|
IDirectDraw3Impl_SetDisplayMode,
|
|
|
|
IDirectDraw3Impl_WaitForVerticalBlank,
|
|
|
|
IDirectDraw3Impl_GetAvailableVidMem,
|
|
|
|
IDirectDraw3Impl_GetSurfaceFromDC,
|
|
|
|
};
|
|
|
|
|
2006-06-09 19:36:12 +02:00
|
|
|
const IDirectDraw4Vtbl IDirectDraw4_Vtbl =
|
2001-01-04 23:44:55 +01:00
|
|
|
{
|
|
|
|
IDirectDraw4Impl_QueryInterface,
|
|
|
|
IDirectDraw4Impl_AddRef,
|
|
|
|
IDirectDraw4Impl_Release,
|
|
|
|
IDirectDraw4Impl_Compact,
|
|
|
|
IDirectDraw4Impl_CreateClipper,
|
|
|
|
IDirectDraw4Impl_CreatePalette,
|
|
|
|
IDirectDraw4Impl_CreateSurface,
|
|
|
|
IDirectDraw4Impl_DuplicateSurface,
|
|
|
|
IDirectDraw4Impl_EnumDisplayModes,
|
|
|
|
IDirectDraw4Impl_EnumSurfaces,
|
|
|
|
IDirectDraw4Impl_FlipToGDISurface,
|
|
|
|
IDirectDraw4Impl_GetCaps,
|
|
|
|
IDirectDraw4Impl_GetDisplayMode,
|
|
|
|
IDirectDraw4Impl_GetFourCCCodes,
|
|
|
|
IDirectDraw4Impl_GetGDISurface,
|
|
|
|
IDirectDraw4Impl_GetMonitorFrequency,
|
|
|
|
IDirectDraw4Impl_GetScanLine,
|
|
|
|
IDirectDraw4Impl_GetVerticalBlankStatus,
|
|
|
|
IDirectDraw4Impl_Initialize,
|
|
|
|
IDirectDraw4Impl_RestoreDisplayMode,
|
|
|
|
IDirectDraw4Impl_SetCooperativeLevel,
|
|
|
|
IDirectDraw4Impl_SetDisplayMode,
|
|
|
|
IDirectDraw4Impl_WaitForVerticalBlank,
|
|
|
|
IDirectDraw4Impl_GetAvailableVidMem,
|
|
|
|
IDirectDraw4Impl_GetSurfaceFromDC,
|
|
|
|
IDirectDraw4Impl_RestoreAllSurfaces,
|
|
|
|
IDirectDraw4Impl_TestCooperativeLevel,
|
|
|
|
IDirectDraw4Impl_GetDeviceIdentifier
|
|
|
|
};
|