Commit 8b1e0416 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Win32: Merge direct3d-desktop and video-wallpaper to fix usability issue

(cherry picked from commit 520e60b6)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 6e04904c
...@@ -233,9 +233,6 @@ static int VideoAutoMenuBuilder( vout_thread_t *p_object, ...@@ -233,9 +233,6 @@ static int VideoAutoMenuBuilder( vout_thread_t *p_object,
PUSH_VAR( "fullscreen" ); PUSH_VAR( "fullscreen" );
PUSH_VAR( "video-on-top" ); PUSH_VAR( "video-on-top" );
PUSH_VAR( "video-wallpaper" ); PUSH_VAR( "video-wallpaper" );
#ifdef WIN32
PUSH_VAR( "direct3d-desktop" );
#endif
PUSH_VAR( "video-snapshot" ); PUSH_VAR( "video-snapshot" );
PUSH_VAR( "zoom" ); PUSH_VAR( "zoom" );
PUSH_VAR( "autoscale" ); PUSH_VAR( "autoscale" );
...@@ -648,10 +645,6 @@ QMenu *VLCMenuBar::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b_subt ...@@ -648,10 +645,6 @@ QMenu *VLCMenuBar::VideoMenu( intf_thread_t *p_intf, QMenu *current, bool b_subt
addActionWithCheckbox( current, "fullscreen", qtr( "&Fullscreen" ) ); addActionWithCheckbox( current, "fullscreen", qtr( "&Fullscreen" ) );
addActionWithCheckbox( current, "autoscale", qtr( "Always Fit &Window" ) ); addActionWithCheckbox( current, "autoscale", qtr( "Always Fit &Window" ) );
addActionWithCheckbox( current, "video-on-top", qtr( "Always &on Top" ) ); addActionWithCheckbox( current, "video-on-top", qtr( "Always &on Top" ) );
#ifdef WIN32
addActionWithCheckbox( current, "direct3d-desktop", qtr( "Display on &Desktop" ) );
#endif
addActionWithCheckbox( current, "video-wallpaper", qtr( "Set as Wall&paper" ) ); addActionWithCheckbox( current, "video-wallpaper", qtr( "Set as Wall&paper" ) );
current->addSeparator(); current->addSeparator();
......
...@@ -70,7 +70,6 @@ vlc_module_begin () ...@@ -70,7 +70,6 @@ vlc_module_begin ()
set_category(CAT_VIDEO) set_category(CAT_VIDEO)
set_subcategory(SUBCAT_VIDEO_VOUT) set_subcategory(SUBCAT_VIDEO_VOUT)
add_bool("direct3d-desktop", false, DESKTOP_TEXT, DESKTOP_LONGTEXT, true)
add_bool("direct3d-hw-blending", true, HW_BLENDING_TEXT, HW_BLENDING_LONGTEXT, true) add_bool("direct3d-hw-blending", true, HW_BLENDING_TEXT, HW_BLENDING_LONGTEXT, true)
set_capability("vout display", 240) set_capability("vout display", 240)
...@@ -156,7 +155,7 @@ static int Open(vlc_object_t *object) ...@@ -156,7 +155,7 @@ static int Open(vlc_object_t *object)
return VLC_EGENERIC; return VLC_EGENERIC;
} }
sys->use_desktop = var_CreateGetBool(vd, "direct3d-desktop"); sys->use_desktop = var_CreateGetBool(vd, "video-wallpaper");
sys->reset_device = false; sys->reset_device = false;
sys->reset_device = false; sys->reset_device = false;
sys->allow_hw_yuv = var_CreateGetBool(vd, "directx-hw-yuv"); sys->allow_hw_yuv = var_CreateGetBool(vd, "directx-hw-yuv");
...@@ -202,8 +201,8 @@ static int Open(vlc_object_t *object) ...@@ -202,8 +201,8 @@ static int Open(vlc_object_t *object)
vlc_value_t val; vlc_value_t val;
val.psz_string = _("Desktop"); val.psz_string = _("Desktop");
var_Change(vd, "direct3d-desktop", VLC_VAR_SETTEXT, &val, NULL); var_Change(vd, "video-wallpaper", VLC_VAR_SETTEXT, &val, NULL);
var_AddCallback(vd, "direct3d-desktop", DesktopCallback, NULL); var_AddCallback(vd, "video-wallpaper", DesktopCallback, NULL);
/* Setup vout_display now that everything is fine */ /* Setup vout_display now that everything is fine */
vd->fmt = fmt; vd->fmt = fmt;
...@@ -235,7 +234,7 @@ static void Close(vlc_object_t *object) ...@@ -235,7 +234,7 @@ static void Close(vlc_object_t *object)
{ {
vout_display_t * vd = (vout_display_t *)object; vout_display_t * vd = (vout_display_t *)object;
var_DelCallback(vd, "direct3d-desktop", DesktopCallback, NULL); var_DelCallback(vd, "video-wallpaper", DesktopCallback, NULL);
vlc_mutex_destroy(&vd->sys->lock); vlc_mutex_destroy(&vd->sys->lock);
Direct3DClose(vd); Direct3DClose(vd);
...@@ -1439,8 +1438,8 @@ static int DesktopCallback(vlc_object_t *object, char const *psz_cmd, ...@@ -1439,8 +1438,8 @@ static int DesktopCallback(vlc_object_t *object, char const *psz_cmd,
playlist_t *p_playlist = pl_Get(vd); playlist_t *p_playlist = pl_Get(vd);
/* Modify playlist as well because the vout might have to be /* Modify playlist as well because the vout might have to be
* restarted */ * restarted */
var_Create(p_playlist, "direct3d-desktop", VLC_VAR_BOOL); var_Create(p_playlist, "video-wallpaper", VLC_VAR_BOOL);
var_SetBool(p_playlist, "direct3d-desktop", newval.b_bool); var_SetBool(p_playlist, "video-wallpaper", newval.b_bool);
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -74,8 +74,6 @@ int vout_OpenWrapper(vout_thread_t *vout, ...@@ -74,8 +74,6 @@ int vout_OpenWrapper(vout_thread_t *vout,
/* */ /* */
#ifdef WIN32 #ifdef WIN32
var_Create(vout, "direct3d-desktop", VLC_VAR_BOOL|VLC_VAR_DOINHERIT);
var_AddCallback(vout, "direct3d-desktop", Forward, NULL);
var_Create(vout, "video-wallpaper", VLC_VAR_BOOL|VLC_VAR_DOINHERIT); var_Create(vout, "video-wallpaper", VLC_VAR_BOOL|VLC_VAR_DOINHERIT);
var_AddCallback(vout, "video-wallpaper", Forward, NULL); var_AddCallback(vout, "video-wallpaper", Forward, NULL);
#endif #endif
...@@ -94,7 +92,6 @@ void vout_CloseWrapper(vout_thread_t *vout, vout_display_state_t *state) ...@@ -94,7 +92,6 @@ void vout_CloseWrapper(vout_thread_t *vout, vout_display_state_t *state)
vout_thread_sys_t *sys = vout->p; vout_thread_sys_t *sys = vout->p;
#ifdef WIN32 #ifdef WIN32
var_DelCallback(vout, "direct3d-desktop", Forward, NULL);
var_DelCallback(vout, "video-wallpaper", Forward, NULL); var_DelCallback(vout, "video-wallpaper", Forward, NULL);
#endif #endif
sys->decoder_pool = NULL; /* FIXME remove */ sys->decoder_pool = NULL; /* FIXME remove */
......
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