Mercurial > mplayer.hg
changeset 33813:a214da7104e2
Use FFMIN/FFMAX.
author | reimar |
---|---|
date | Sun, 24 Jul 2011 19:10:45 +0000 |
parents | 268d0a7c02bd |
children | ccbef55f408c |
files | libvo/vo_directx.c |
diffstat | 1 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_directx.c Sun Jul 24 19:03:19 2011 +0000 +++ b/libvo/vo_directx.c Sun Jul 24 19:10:45 2011 +0000 @@ -579,14 +579,10 @@ } /*make sure the overlay is inside the screen*/ - if (rd.left < 0) - rd.left = 0; - if (rd.right > vo_screenwidth) - rd.right = vo_screenwidth; - if (rd.top < 0) - rd.top = 0; - if (rd.bottom > vo_screenheight) - rd.bottom = vo_screenheight; + rd.top = FFMAX(rd.top, 0); + rd.left = FFMAX(rd.left, 0); + rd.bottom = FFMIN(rd.bottom, vo_screenheight); + rd.right = FFMIN(rd.right, vo_screenwidth); /*for nonoverlay mode we are finished, for overlay mode we have to display the overlay first*/ if (nooverlay)