sys->use_wallpaper = var_CreateGetBool(vd, "video-wallpaper");
/* FIXME */
sys->use_overlay = false;//var_CreateGetBool(vd, "overlay"); /* FIXME */
+ sys->restore_overlay = false;
var_Create(vd, "directx-device", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
/* Initialisation */
DirectXUpdateOverlay(vd, NULL);
}
}
+ if (sys->restore_overlay)
+ DirectXUpdateOverlay(vd, NULL);
/* */
DirectXUnlock(picture);
if (ch_wallpaper)
WallpaperChange(vd, wallpaper_requested);
+
+ /* */
+ if (sys->restore_overlay)
+ DirectXUpdateOverlay(vd, NULL);
}
/* */
HRESULT hr = IDirectDrawSurface2_UpdateOverlay(surface,
&src, sys->display, &dst,
DDOVER_SHOW | DDOVER_KEYDESTOVERRIDE, &ddofx);
+ sys->restore_overlay = hr != DD_OK;
+
if (hr != DD_OK) {
msg_Warn(vd, "DirectDrawUpdateOverlay cannot move/resize overlay");
return VLC_EGENERIC;