summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrantišek Dvořák <valtri@users.sourceforge.net>2004-01-01 18:14:51 +0000
committerFrantišek Dvořák <valtri@users.sourceforge.net>2004-01-01 18:14:51 +0000
commit6fc61879fcde8b512d5654588bc8daa2fb13128e (patch)
tree84c442c3905af9aa974d8179236b8f86a89e51bf /src
parent68651ae25728f746df6736cc7291179d60232315 (diff)
downloadxine-lib-6fc61879fcde8b512d5654588bc8daa2fb13128e.tar.gz
xine-lib-6fc61879fcde8b512d5654588bc8daa2fb13128e.tar.bz2
Win32 port, mainly DirectX:
* use DirectX under CygWin and basic auto-stuff * move some my macros in configure.ac * I don't know why, but shared directx plugins can't be linked with libdxguid.a. Used cute-hack, idea is from mplayer. Also thanks to hexedit, because I haven't sources of w32api. * Fix some warnings in vo directx and ao directx. * Decrease version of directx. It seems it still works. For compilation with DirectX under Cygwin you need header files from directx-sdk. Autoconf macros are only basic, but it works. for example: DIRECTX_CFLAGS=-I/cygrive/c/Program\ Files/Directx/include ./autogen.sh CVS patchset: 5971 CVS date: 2004/01/01 18:14:51
Diffstat (limited to 'src')
-rw-r--r--src/audio_out/Makefile.am15
-rwxr-xr-xsrc/audio_out/audio_directx_out.c22
-rw-r--r--src/video_out/Makefile.am14
-rwxr-xr-xsrc/video_out/video_out_directx.c119
4 files changed, 113 insertions, 57 deletions
diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am
index 84173fad2..6451fcc37 100644
--- a/src/audio_out/Makefile.am
+++ b/src/audio_out/Makefile.am
@@ -1,8 +1,8 @@
include $(top_srcdir)/misc/Makefile.common
-AM_CFLAGS = -DXINE_COMPILE $(ALSA_CFLAGS) $(ESD_CFLAGS) $(IRIXAL_CFLAGS) $(ARTS_CFLAGS)
+AM_CFLAGS = -DXINE_COMPILE $(ALSA_CFLAGS) $(ESD_CFLAGS) $(IRIXAL_CFLAGS) $(ARTS_CFLAGS) $(DIRECTX_CFLAGS)
-EXTRA_DIST = audio_irixal_out.c audio_directx_out.c
+EXTRA_DIST = audio_irixal_out.c
libdir = $(XINE_PLUGINDIR)
@@ -32,6 +32,10 @@ if HAVE_ARTS
arts_module = xineplug_ao_out_arts.la
endif
+if HAVE_DIRECTX
+directx_module = xineplug_ao_out_directx.la
+endif
+
##
# IMPORTANT:
# ---------
@@ -42,7 +46,8 @@ lib_LTLIBRARIES = xineplug_ao_out_none.la $(oss_module) \
$(alsa_module) \
$(sun_module) \
$(arts_module) \
- $(esd_module)
+ $(esd_module) \
+ $(directx_module)
#lib_LTLIBRARIES = \
# $(alsa_module) \
@@ -78,3 +83,7 @@ xineplug_ao_out_sun_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
xineplug_ao_out_arts_la_SOURCES = audio_arts_out.c
xineplug_ao_out_arts_la_LIBADD = $(ARTS_LIBS)
xineplug_ao_out_arts_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
+
+xineplug_ao_out_directx_la_SOURCES = audio_directx_out.c
+xineplug_ao_out_directx_la_LIBADD = $(DIRECTX_AUDIO_LIBS) $(XINE_LIB)
+xineplug_ao_out_directx_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
diff --git a/src/audio_out/audio_directx_out.c b/src/audio_out/audio_directx_out.c
index df6c2b38c..8b0c327f8 100755
--- a/src/audio_out/audio_directx_out.c
+++ b/src/audio_out/audio_directx_out.c
@@ -20,15 +20,13 @@
* audio_directx_out.c, direct sound audio output plugin for xine
* by Matthew Grooms <elon@altavista.com>
*
- * $Id: audio_directx_out.c,v 1.8 2003/12/14 22:13:22 siggi Exp $
+ * $Id: audio_directx_out.c,v 1.9 2004/01/01 18:14:51 valtri Exp $
*/
typedef unsigned char boolean;
#include <windows.h>
#include <dsound.h>
-#include "audio_out.h"
-#include "xine_internal.h"
#define LOG_MODULE "audio_directx_out"
#define LOG_VERBOSE
@@ -36,6 +34,10 @@ typedef unsigned char boolean;
#define LOG
*/
+#include "audio_out.h"
+#include "xine_internal.h"
+
+
#define MAX_CHANNELS 6
#define MAX_BITS 16
#define MAX_SAMPLE_RATE 44100
@@ -48,6 +50,18 @@ typedef unsigned char boolean;
#define AO_DIRECTX_IFACE_VERSION 8
+/*****************************************************************************
+ * DirectDraw GUIDs.
+ * Defining them here allows us to get rid of the dxguid library during
+ * the linking stage.
+ *****************************************************************************/
+#if 1
+static const GUID IID_IDirectSoundNotify = {
+ 0xB0210783,0x89CD,0x11D0,{0xAF,0x08,0x00,0xA0,0xC9,0x25,0xCD,0x16}
+};
+#endif
+
+
/* -----------------------------------------
*
* ao_directx driver struct
@@ -804,7 +818,7 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da
return ( ao_driver_t * ) ao_directx;
}
-static char* get_identifier (video_driver_class_t *this_gen) {
+static char* get_identifier (audio_driver_class_t *this_gen) {
return "DirectX";
}
diff --git a/src/video_out/Makefile.am b/src/video_out/Makefile.am
index 2e26d832f..af4a3c221 100644
--- a/src/video_out/Makefile.am
+++ b/src/video_out/Makefile.am
@@ -10,7 +10,7 @@ VIDIX_CFLAGS = -I$(top_builddir)/src/video_out/vidix \
AM_CFLAGS = $(X_CFLAGS) \
-DXINE_COMPILE $(SDL_CFLAGS) $(VIDIX_CFLAGS) \
$(AALIB_CFLAGS) $(MLIB_CFLAGS) $(LIBSTK_CFLAGS) \
- $(DIRECTFB_CFLAGS)
+ $(DIRECTFB_CFLAGS) $(DIRECTX_CFLAGS)
libdir = $(XINE_PLUGINDIR)
@@ -56,6 +56,10 @@ if HAVE_STK
stk_module = xineplug_vo_out_stk.la
endif
+if HAVE_DIRECTX
+directx_module = xineplug_vo_out_directx.la
+endif
+
# important:
#
# all xine video out plugins should be named
@@ -65,7 +69,8 @@ endif
# $(syncfb_module) $(fb_module) $(opengl_module) $(sdl_module) $(vidix_module)
lib_LTLIBRARIES = $(xshm_module) $(xv_module) $(xvmc_module) $(aa_module) $(pgx64_module) \
$(vidix_module) $(fb_module) $(sdl_module) $(syncfb_module) \
- $(stk_module) $(directfb_module) xineplug_vo_out_none.la
+ $(stk_module) $(directfb_module) xineplug_vo_out_none.la \
+ $(directx_module)
xineplug_vo_out_xv_la_SOURCES = $(X11OSD) deinterlace.c alphablend.c video_out_xv.c
@@ -126,5 +131,10 @@ xineplug_vo_out_stk_la_SOURCES = alphablend.c video_out_stk.c
xineplug_vo_out_stk_la_LIBADD = $(LIBSTK_LIBS)
xineplug_vo_out_stk_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
+
+xineplug_vo_out_directx_la_SOURCES = alphablend.c yuv2rgb.c yuv2rgb_mmx.c video_out_directx.c
+xineplug_vo_out_directx_la_LIBADD = $(DIRECTX_VIDEO_LIBS) $(XINE_LIB)
+xineplug_vo_out_directx_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
+
noinst_HEADERS = alphablend.h deinterlace.h video_out_syncfb.h \
yuv2rgb.h video_out_win32.h x11osd.h
diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c
index 84acb29fb..4237ca56e 100755
--- a/src/video_out/video_out_directx.c
+++ b/src/video_out/video_out_directx.c
@@ -20,7 +20,7 @@
* video_out_directx.c, direct draw video output plugin for xine
* by Matthew Grooms <elon@altavista.com>
*
- * $Id: video_out_directx.c,v 1.14 2003/12/14 22:13:25 siggi Exp $
+ * $Id: video_out_directx.c,v 1.15 2004/01/01 18:14:51 valtri Exp $
*/
typedef unsigned char boolean;
@@ -50,6 +50,29 @@ typedef unsigned char boolean;
#define BORDER_SIZE 8
#define IMGFMT_NATIVE 4
+/*****************************************************************************
+ * DirectDraw GUIDs.
+ * Defining them here allows us to get rid of the dxguid library during
+ * the linking stage.
+ *****************************************************************************/
+#if 0
+static const GUID IID_IDirectDraw = {
+ 0x6C14DB80,0xA733,0x11CE,{0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60}
+};
+#endif
+
+#if 0
+static const GUID IID_IDirectDraw2 = {
+ 0xB3A6F3E0,0x2B43,0x11CF,{0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56}
+};
+#endif
+
+#if 1
+static const GUID IID_IDirectDraw4 = {
+ 0x9C59509A,0x39BD,0x11D1,{0x8C,0x4A,0x00,0xC0,0x4F,0xD9,0x30,0xC5}
+};
+#endif
+
/* -----------------------------------------
*
* vo_directx frame struct
@@ -60,8 +83,8 @@ typedef struct {
vo_frame_t vo_frame;
uint8_t *buffer;
int format;
- int width;
- int height;
+ uint32_t width;
+ uint32_t height;
int size;
double ratio;
} win32_frame_t;
@@ -78,17 +101,17 @@ typedef struct {
xine_t *xine;
- LPDIRECTDRAW7 ddobj; /* direct draw object */
- LPDIRECTDRAWSURFACE primary; /* primary dd surface */
- LPDIRECTDRAWSURFACE secondary; /* secondary dd surface */
+ LPDIRECTDRAW4 ddobj; /* direct draw object */
+ LPDIRECTDRAWSURFACE4 primary; /* primary dd surface */
+ LPDIRECTDRAWSURFACE4 secondary; /* secondary dd surface */
LPDIRECTDRAWCLIPPER ddclipper; /* dd clipper object */
uint8_t * contents; /* secondary contents */
win32_frame_t *current; /* current frame */
int req_format; /* requested frame format */
int act_format; /* actual frame format */
- int width; /* frame with */
- int height; /* frame height */
+ uint32_t width; /* frame with */
+ uint32_t height; /* frame height */
double ratio; /* frame ratio */
yuv2rgb_factory_t *yuv2rgb_factory; /* used for format conversion */
@@ -176,10 +199,10 @@ boolean CreatePrimary( win32_driver_t * win32_driver )
/* try to get new interface */
- result = IDirectDraw_QueryInterface( ddobj, &IID_IDirectDraw7, (LPVOID *) &win32_driver->ddobj );
+ result = IDirectDraw_QueryInterface( ddobj, &IID_IDirectDraw4, (LPVOID *) &win32_driver->ddobj );
if( result != DD_OK )
{
- Error( 0, "ddobj->QueryInterface : DirectX 7 or higher required" );
+ Error( 0, "ddobj->QueryInterface : DirectX 4 or higher required" );
return 0;
}
@@ -194,7 +217,7 @@ boolean CreatePrimary( win32_driver_t * win32_driver )
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
- result = IDirectDraw7_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->primary, 0 );
+ result = IDirectDraw4_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->primary, 0 );
if( result != DD_OK )
{
Error( 0, "CreateSurface ( primary ) : error %i ", result );
@@ -203,7 +226,7 @@ boolean CreatePrimary( win32_driver_t * win32_driver )
/* create our clipper object */
- result = IDirectDraw7_CreateClipper( win32_driver->ddobj, 0, &win32_driver->ddclipper, 0 );
+ result = IDirectDraw4_CreateClipper( win32_driver->ddobj, 0, &win32_driver->ddclipper, 0 );
if( result != DD_OK )
{
Error( 0, "CreateClipper : error %i", result );
@@ -221,7 +244,7 @@ boolean CreatePrimary( win32_driver_t * win32_driver )
/* associate our primary surface with our clipper */
- result = IDirectDrawSurface7_SetClipper( win32_driver->primary, win32_driver->ddclipper );
+ result = IDirectDrawSurface4_SetClipper( win32_driver->primary, win32_driver->ddclipper );
if( result != DD_OK )
{
Error( 0, "ddclipper->SetHWnd : error %i", result );
@@ -274,7 +297,7 @@ boolean CreateSecondary( win32_driver_t * win32_driver, int width, int height, i
* surface then release it */
if( win32_driver->secondary )
- IDirectDrawSurface7_Release( win32_driver->secondary );
+ IDirectDrawSurface4_Release( win32_driver->secondary );
memset( &ddsd, 0, sizeof( ddsd ) );
ddsd.dwSize = sizeof( ddsd );
@@ -333,9 +356,9 @@ boolean CreateSecondary( win32_driver_t * win32_driver, int width, int height, i
}
#endif /* RGB_SUPPORT */
- lprintf("CreateSecondary() - IDirectDraw7_CreateSurface()\n");
+ lprintf("CreateSecondary() - IDirectDraw4_CreateSurface()\n");
- if( IDirectDraw7_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->secondary, 0 ) == DD_OK )
+ if( IDirectDraw4_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->secondary, 0 ) == DD_OK )
return TRUE;
/* Our fallback method is to create a back buffer
@@ -350,7 +373,7 @@ boolean CreateSecondary( win32_driver_t * win32_driver, int width, int height, i
win32_driver->act_format = IMGFMT_NATIVE;
- if( IDirectDraw7_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->secondary, 0 ) == DD_OK )
+ if( IDirectDraw4_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->secondary, 0 ) == DD_OK )
return TRUE;
/* This is bad. We cant even create a surface with
@@ -370,10 +393,10 @@ void Destroy( win32_driver_t * win32_driver )
IDirectDrawClipper_Release( win32_driver->ddclipper );
if( win32_driver->primary )
- IDirectDrawSurface7_Release( win32_driver->primary );
+ IDirectDrawSurface4_Release( win32_driver->primary );
if( win32_driver->secondary )
- IDirectDrawSurface7_Release( win32_driver->secondary );
+ IDirectDrawSurface4_Release( win32_driver->secondary );
if( win32_driver->ddobj )
IDirectDraw_Release( win32_driver->ddobj );
@@ -395,10 +418,10 @@ boolean CheckPixelFormat( win32_driver_t * win32_driver )
memset( &ddpf, 0, sizeof( DDPIXELFORMAT ));
ddpf.dwSize = sizeof( DDPIXELFORMAT );
- result = IDirectDrawSurface7_GetPixelFormat( win32_driver->primary, &ddpf );
+ result = IDirectDrawSurface4_GetPixelFormat( win32_driver->primary, &ddpf );
if( result != DD_OK )
{
- Error( 0, "IDirectDrawSurface7_GetPixelFormat ( CheckPixelFormat ) : error %u", result );
+ Error( 0, "IDirectDrawSurface4_GetPixelFormat ( CheckPixelFormat ) : error %u", result );
return 0;
}
@@ -461,9 +484,9 @@ boolean CheckPixelFormat( win32_driver_t * win32_driver )
* being pushed to the backend. */
-LPDIRECTDRAWSURFACE7 CreateBMP( win32_driver_t * win32_driver, int resource )
+LPDIRECTDRAWSURFACE4 CreateBMP( win32_driver_t * win32_driver, int resource )
{
- LPDIRECTDRAWSURFACE7 bmp_surf;
+ LPDIRECTDRAWSURFACE4 bmp_surf;
DDSURFACEDESC2 bmp_ddsd;
HBITMAP bmp_hndl;
BITMAP bmp_head;
@@ -490,7 +513,7 @@ LPDIRECTDRAWSURFACE7 CreateBMP( win32_driver_t * win32_driver, int resource )
bmp_ddsd.dwWidth = bmp_head.bmWidth;
bmp_ddsd.dwHeight = bmp_head.bmHeight;
- if( IDirectDraw7_CreateSurface( win32_driver->ddobj, &bmp_ddsd, &bmp_surf, 0 ) != DD_OK )
+ if( IDirectDraw4_CreateSurface( win32_driver->ddobj, &bmp_ddsd, &bmp_surf, 0 ) != DD_OK )
{
Error( 0, "CreateSurface ( bitmap ) : could not create dd surface" );
return 0;
@@ -500,7 +523,7 @@ LPDIRECTDRAWSURFACE7 CreateBMP( win32_driver_t * win32_driver, int resource )
* create a compat dc and load
* our bitmap into the compat dc */
- IDirectDrawSurface7_GetDC( bmp_surf, &hdc_dds );
+ IDirectDrawSurface4_GetDC( bmp_surf, &hdc_dds );
hdc_mem = CreateCompatibleDC( hdc_dds );
SelectObject( hdc_mem, bmp_hndl );
@@ -514,7 +537,7 @@ LPDIRECTDRAWSURFACE7 CreateBMP( win32_driver_t * win32_driver, int resource )
DeleteDC( hdc_mem );
DeleteObject( bmp_hndl );
- IDirectDrawSurface7_ReleaseDC( bmp_surf, hdc_dds );
+ IDirectDrawSurface4_ReleaseDC( bmp_surf, hdc_dds );
return bmp_surf;
}
@@ -524,8 +547,8 @@ LPDIRECTDRAWSURFACE7 CreateBMP( win32_driver_t * win32_driver, int resource )
* a h/w overlay of the current frame type
* is supported. */
-boolean Overlay( LPDIRECTDRAWSURFACE7 src_surface, RECT * src_rect,
- LPDIRECTDRAWSURFACE7 dst_surface, RECT * dst_rect,
+boolean Overlay( LPDIRECTDRAWSURFACE4 src_surface, RECT * src_rect,
+ LPDIRECTDRAWSURFACE4 dst_surface, RECT * dst_rect,
COLORREF color_key )
{
DWORD dw_color_key;
@@ -539,10 +562,10 @@ boolean Overlay( LPDIRECTDRAWSURFACE7 src_surface, RECT * src_rect,
memset( &ddpf, 0, sizeof( DDPIXELFORMAT ));
ddpf.dwSize = sizeof( DDPIXELFORMAT );
- result = IDirectDrawSurface7_GetPixelFormat( dst_surface, &ddpf );
+ result = IDirectDrawSurface4_GetPixelFormat( dst_surface, &ddpf );
if( result != DD_OK )
{
- Error( 0, "IDirectDrawSurface7_GetPixelFormat : could not get surface pixel format" );
+ Error( 0, "IDirectDrawSurface4_GetPixelFormat : could not get surface pixel format" );
return FALSE;
}
@@ -560,19 +583,19 @@ boolean Overlay( LPDIRECTDRAWSURFACE7 src_surface, RECT * src_rect,
/* attempt to overlay the surface */
- result = IDirectDrawSurface7_UpdateOverlay( src_surface, src_rect, dst_surface, dst_rect, flags, &ddofx );
+ result = IDirectDrawSurface4_UpdateOverlay( src_surface, src_rect, dst_surface, dst_rect, flags, &ddofx );
if( result != DD_OK )
{
if( result == DDERR_SURFACELOST )
{
- IDirectDrawSurface7_Restore( src_surface );
- IDirectDrawSurface7_Restore( dst_surface );
+ IDirectDrawSurface4_Restore( src_surface );
+ IDirectDrawSurface4_Restore( dst_surface );
- IDirectDrawSurface7_UpdateOverlay( src_surface, src_rect, dst_surface, dst_rect, flags, &ddofx );
+ IDirectDrawSurface4_UpdateOverlay( src_surface, src_rect, dst_surface, dst_rect, flags, &ddofx );
}
else
{
- Error( 0, "IDirectDrawSurface7_UpdateOverlay : error %i", result );
+ Error( 0, "IDirectDrawSurface4_UpdateOverlay : error %i", result );
return FALSE;
}
}
@@ -585,8 +608,8 @@ boolean Overlay( LPDIRECTDRAWSURFACE7 src_surface, RECT * src_rect,
* h/w overlay of the current frame format is
* not supported. */
-boolean BltCopy( LPDIRECTDRAWSURFACE7 src_surface, RECT * src_rect,
- LPDIRECTDRAWSURFACE7 dst_surface, RECT * dst_rect )
+boolean BltCopy( LPDIRECTDRAWSURFACE4 src_surface, RECT * src_rect,
+ LPDIRECTDRAWSURFACE4 dst_surface, RECT * dst_rect )
{
DDSURFACEDESC ddsd_target;
HRESULT result;
@@ -596,19 +619,19 @@ boolean BltCopy( LPDIRECTDRAWSURFACE7 src_surface, RECT * src_rect,
/* attempt to blt the surface sontents */
- result = IDirectDrawSurface7_Blt( dst_surface, dst_rect, src_surface, src_rect, DDBLT_WAIT, 0 );
+ result = IDirectDrawSurface4_Blt( dst_surface, dst_rect, src_surface, src_rect, DDBLT_WAIT, 0 );
if( result != DD_OK )
{
if( result != DDERR_SURFACELOST )
{
- IDirectDrawSurface7_Restore( src_surface );
- IDirectDrawSurface7_Restore( dst_surface );
+ IDirectDrawSurface4_Restore( src_surface );
+ IDirectDrawSurface4_Restore( dst_surface );
- IDirectDrawSurface7_Blt( dst_surface, dst_rect, src_surface, src_rect, DDBLT_WAIT, 0 );
+ IDirectDrawSurface4_Blt( dst_surface, dst_rect, src_surface, src_rect, DDBLT_WAIT, 0 );
}
else
{
- Error( 0, "IDirectDrawSurface7_Blt : error %i", result );
+ Error( 0, "IDirectDrawSurface4_Blt : error %i", result );
return FALSE;
}
}
@@ -729,7 +752,7 @@ boolean DisplayFrame( win32_driver_t * win32_driver )
void * Lock( void * surface )
{
- LPDIRECTDRAWSURFACE7 lock_surface = ( LPDIRECTDRAWSURFACE7 ) surface;
+ LPDIRECTDRAWSURFACE4 lock_surface = ( LPDIRECTDRAWSURFACE4 ) surface;
DDSURFACEDESC2 ddsd;
HRESULT result;
@@ -739,11 +762,11 @@ void * Lock( void * surface )
memset( &ddsd, 0, sizeof( ddsd ) );
ddsd.dwSize = sizeof( ddsd );
- result = IDirectDrawSurface7_Lock( lock_surface, 0, &ddsd, DDLOCK_WAIT | DDLOCK_NOSYSLOCK, 0 );
+ result = IDirectDrawSurface4_Lock( lock_surface, 0, &ddsd, DDLOCK_WAIT | DDLOCK_NOSYSLOCK, 0 );
if( result == DDERR_SURFACELOST )
{
- IDirectDrawSurface7_Restore( lock_surface );
- result = IDirectDrawSurface7_Lock( lock_surface, 0, &ddsd, DDLOCK_WAIT | DDLOCK_NOSYSLOCK, 0 );
+ IDirectDrawSurface4_Restore( lock_surface );
+ result = IDirectDrawSurface4_Lock( lock_surface, 0, &ddsd, DDLOCK_WAIT | DDLOCK_NOSYSLOCK, 0 );
if( result != DD_OK )
return 0;
@@ -767,12 +790,12 @@ void * Lock( void * surface )
void Unlock( void * surface )
{
- LPDIRECTDRAWSURFACE7 lock_surface = ( LPDIRECTDRAWSURFACE7 ) surface;
+ LPDIRECTDRAWSURFACE4 lock_surface = ( LPDIRECTDRAWSURFACE4 ) surface;
if( !surface )
return;
- IDirectDrawSurface7_Unlock( lock_surface, 0 );
+ IDirectDrawSurface4_Unlock( lock_surface, 0 );
}
/* -----------------------------------------