}
/*
- * Desktop mode change
- */
+ * Desktop mode change
+ */
if( p_vout->p_sys->i_changes & DX_DESKTOP_CHANGE )
{
/* Close the direct3d instance attached to the current output window. */
End( p_vout );
StopEventThread( p_vout );
- /* Set the switching mode flag */
- p_vout->p_sys->i_changes |= SWITCHING_MODE_FLAG;
- /* Reset the flag */
- p_vout->p_sys->i_changes &= ~DX_DESKTOP_CHANGE;
- }
- if( p_vout->p_sys->i_changes & EVENT_THREAD_ENDED
- && p_vout->p_sys->i_changes & SWITCHING_MODE_FLAG )
- {
/* Open the direct3d output and attaches it to the new window */
p_vout->p_sys->b_desktop = !p_vout->p_sys->b_desktop;
p_vout->pf_display = FirstDisplay;
CreateEventThread( p_vout );
Init( p_vout );
- /* Reset the flags */
- p_vout->p_sys->i_changes &= ~EVENT_THREAD_ENDED;
- p_vout->p_sys->i_changes &= ~SWITCHING_MODE_FLAG;
+ /* Reset the flag */
+ p_vout->p_sys->i_changes &= ~DX_DESKTOP_CHANGE;
}
/* autoscale toggle */
LPDIRECT3DDEVICE9 p_d3ddev = p_vout->p_sys->p_d3ddev;
- if( p_vout->p_sys->i_changes & SWITCHING_MODE_FLAG )
- return;
-
// Present the back buffer contents to the display
// stretching and filtering happens here
HRESULT hr = IDirect3DDevice9_Present(p_d3ddev,
HRESULT hr;
float f_width, f_height;
- if( p_vout->p_sys->i_changes & SWITCHING_MODE_FLAG )
- return;
-
// check if device is still available
hr = IDirect3DDevice9_TestCooperativeLevel(p_d3ddev);
if( FAILED(hr) )
msg_Dbg( p_vout, "DirectXEventThread terminating" );
DirectXCloseWindow( p_event->p_vout );
- vlc_restorecancel (canc);
-
- /* clear the changes formerly signaled */
- p_event->p_vout->p_sys->i_changes = EVENT_THREAD_ENDED;
+ vlc_restorecancel(canc);
return NULL;
}
vlc_join( p_event->thread, NULL );
p_event->b_ready = false;
+
+ /* clear the changes formerly signaled */
+ p_event->p_vout->p_sys->i_changes = 0;
}
/* */
#define DX_POSITION_CHANGE 0x1000
#define DX_WALLPAPER_CHANGE 0x2000
#define DX_DESKTOP_CHANGE 0x4000
-#define EVENT_THREAD_ENDED 0x6000
-#define SWITCHING_MODE_FLAG 0x8000
/*****************************************************************************
* WinCE helpers