Commit 4b482440 authored by Damien Fouilleul's avatar Damien Fouilleul

- backporting from 0.8.6

parent 3b44fa8c
This diff is collapsed.
......@@ -77,6 +77,8 @@ struct picture_sys_t
* the linking stage.
*****************************************************************************/
#include <initguid.h>
#undef GUID_EXT
#define GUID_EXT
DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 );
......
......@@ -433,7 +433,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
* then fine, otherwise return with an error. */
if( !GetClassInfo( hInstance, _T("VLC DirectX"), &wndclass ) )
{
msg_Err( p_vout, "DirectXCreateWindow RegisterClass FAILED" );
msg_Err( p_vout, "DirectXCreateWindow RegisterClass FAILED (err=%lu)", GetLastError() );
return VLC_EGENERIC;
}
}
......@@ -448,7 +448,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
* then fine, otherwise return with an error. */
if( !GetClassInfo( hInstance, _T("VLC DirectX video"), &wndclass ) )
{
msg_Err( p_vout, "DirectXCreateWindow RegisterClass FAILED" );
msg_Err( p_vout, "DirectXCreateWindow RegisterClass FAILED (err=%lu)", GetLastError() );
return VLC_EGENERIC;
}
}
......@@ -505,7 +505,7 @@ static int DirectXCreateWindow( vout_thread_t *p_vout )
if( !p_vout->p_sys->hwnd )
{
msg_Warn( p_vout, "DirectXCreateWindow create window FAILED" );
msg_Warn( p_vout, "DirectXCreateWindow create window FAILED (err=%lu)", GetLastError() );
return VLC_EGENERIC;
}
......@@ -768,10 +768,17 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
/* Store p_vout for future use */
p_vout = (vout_thread_t *)((CREATESTRUCT *)lParam)->lpCreateParams;
SetWindowLongPtr( hwnd, GWLP_USERDATA, (LONG_PTR)p_vout );
return TRUE;
}
else
{
p_vout = (vout_thread_t *)GetWindowLongPtr( hwnd, GWLP_USERDATA );
if( !p_vout )
{
/* Hmmm mozilla does manage somehow to save the pointer to our
* windowproc and still calls it after the vout has been closed. */
return DefWindowProc(hwnd, message, wParam, lParam);
}
}
/* Catch the screensaver and the monitor turn-off */
......@@ -782,13 +789,6 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
return 0; /* this stops them from happening */
}
if( !p_vout )
{
/* Hmmm mozilla does manage somehow to save the pointer to our
* windowproc and still calls it after the vout has been closed. */
return DefWindowProc(hwnd, message, wParam, lParam);
}
if( hwnd == p_vout->p_sys->hvideownd )
return DefWindowProc(hwnd, message, wParam, lParam);
......@@ -845,7 +845,6 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
/* We do not want to relay these messages to the parent window
* because we rely on the background color for the overlay. */
return DefWindowProc(hwnd, message, wParam, lParam);
break;
default:
//msg_Dbg( p_vout, "WinProc WM Default %i", message );
......
......@@ -88,6 +88,8 @@ struct vout_sys_t
RECT rect_dest;
RECT rect_dest_clipped;
vlc_bool_t b_hw_yuv; /* Should we use hardware YUV->RGB conversions */
#ifdef MODULE_NAME_IS_vout_directx
/* Overlay alignment restrictions */
int i_align_src_boundary;
......@@ -97,7 +99,6 @@ struct vout_sys_t
vlc_bool_t b_using_overlay; /* Are we using an overlay surface */
vlc_bool_t b_use_sysmem; /* Should we use system memory for surfaces */
vlc_bool_t b_hw_yuv; /* Should we use hardware YUV->RGB conversions */
vlc_bool_t b_3buf_overlay; /* Should we use triple buffered overlays */
/* DDraw capabilities */
......@@ -123,6 +124,7 @@ struct vout_sys_t
#ifdef MODULE_NAME_IS_direct3d
// core objects
HINSTANCE hd3d9_dll; /* handle of the opened d3d9 dll */
LPDIRECT3D9 p_d3dobj;
LPDIRECT3DDEVICE9 p_d3ddev;
D3DPRESENT_PARAMETERS d3dpp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment