summaryrefslogtreecommitdiff
path: root/src/video_out/video_out_directx.c
diff options
context:
space:
mode:
authorDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-12-15 19:13:59 +0100
committerDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-12-15 19:13:59 +0100
commit4c90da28e5dd01cb5fa01a293c418690d395d9f6 (patch)
treea7f262652b9a62bab6ec567bfced62528f4e4b9d /src/video_out/video_out_directx.c
parent9c92484c911e0f3d401a0230c90c4bcf40b84c05 (diff)
parente5be769581739cdafd385d55896abca4816ea29e (diff)
downloadxine-lib-4c90da28e5dd01cb5fa01a293c418690d395d9f6.tar.gz
xine-lib-4c90da28e5dd01cb5fa01a293c418690d395d9f6.tar.bz2
Merge from 1.1; update PO files; make buildable.
--HG-- rename : include/xine.h.in => include/xine.h rename : src/xine-utils/attributes.h => include/xine/attributes.h rename : src/xine-engine/buffer.h => include/xine/buffer.h rename : m4/_xine.m4 => m4/types.m4 rename : po/libxine1.pot => po/libxine2.pot rename : src/libfaad/xine_faad_decoder.c => src/audio_dec/xine_faad_decoder.c rename : src/libspucc/cc_decoder.h => src/spu_dec/cc_decoder.h rename : src/libspucmml/xine_cmml_decoder.c => src/spu_dec/cmml_decoder.c rename : src/libspudec/xine_spu_decoder.c => src/spu_dec/spu_decoder.c rename : src/libspudvb/xine_spudvb_decoder.c => src/spu_dec/spudvb_decoder.c rename : src/libspucc/xine_cc_decoder.c => src/spu_dec/xine_cc_decoder.c rename : src/libmpeg2/mpeg2.h => src/video_dec/libmpeg2/mpeg2.h
Diffstat (limited to 'src/video_out/video_out_directx.c')
-rw-r--r--src/video_out/video_out_directx.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/video_out/video_out_directx.c b/src/video_out/video_out_directx.c
index 7c63f93e9..9570135b0 100644
--- a/src/video_out/video_out_directx.c
+++ b/src/video_out/video_out_directx.c
@@ -117,7 +117,7 @@ typedef struct {
yuv2rgb_t *yuv2rgb; /* used for format conversion */
int mode; /* rgb mode */
int bytespp; /* rgb bits per pixel */
-
+ DDPIXELFORMAT primary_pixel_format;
alphablend_t alphablend_extra_data;
} win32_driver_t;
@@ -367,8 +367,9 @@ static boolean CreateSecondary( win32_driver_t * win32_driver, int width, int he
lprintf("CreateSecondary() - Falling back to back buffer same as primary\n");
lprintf("CreateSecondary() - act_format = (NATIVE) %d\n", IMGFMT_NATIVE);
- ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT;
+ ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT;
ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY;
+ ddsd.ddpfPixelFormat = win32_driver->primary_pixel_format;
win32_driver->act_format = IMGFMT_NATIVE;
if( IDirectDraw_CreateSurface( win32_driver->ddobj, &ddsd, &win32_driver->secondary, 0 ) == DD_OK )
@@ -429,6 +430,10 @@ static boolean CheckPixelFormat( win32_driver_t * win32_driver )
Error( 0, "IDirectDrawSurface_GetPixelFormat ( CheckPixelFormat ) : error 0x%lx", result );
return 0;
}
+
+ /* store pixel format for CreateSecondary */
+
+ win32_driver->primary_pixel_format = ddpf;
/* TODO : support paletized video modes */
@@ -478,6 +483,7 @@ static boolean CheckPixelFormat( win32_driver_t * win32_driver )
win32_driver->mode = MODE_15_BGR;
}
+ lprintf("win32 mode: %u\n", win32_driver->mode);
return TRUE;
}