Commit 8decc1d4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

directdraw: inline picture place clipping

This cannot possibly result in correct picture scale and position, but
then again, this was already the case before this change.
parent db79d8e8
......@@ -1361,7 +1361,20 @@ static int DirectXUpdateOverlay(vout_display_t *vd, LPDIRECTDRAWSURFACE2 surface
cfg.display.height = sys->sys.rect_display.bottom;
vout_display_place_t place;
vout_display_PlacePicture(&place, &vd->source, &cfg, true);
vout_display_PlacePicture(&place, &vd->source, &cfg, false);
if (place.x < 0) {
place.width += -place.x;
place.x = 0;
}
if (place.y < 0) {
place.height += -place.y;
place.y = 0;
}
if (place.width > cfg.display.width)
place.width = cfg.display.width;
if (place.height > cfg.display.height)
place.height = cfg.display.height;
dst.left = sys->sys.rect_display.left + place.x;
dst.top = sys->sys.rect_display.top + place.y;
......
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