Mercurial > mplayer.hg
comparison libvo/vo_directx.c @ 33813:a214da7104e2
Use FFMIN/FFMAX.
author | reimar |
---|---|
date | Sun, 24 Jul 2011 19:10:45 +0000 |
parents | c1299d6cbc4e |
children | ccbef55f408c |
comparison
equal
deleted
inserted
replaced
33812:268d0a7c02bd | 33813:a214da7104e2 |
---|---|
577 } else { | 577 } else { |
578 g_lpddclipper->lpVtbl->SetHWnd(g_lpddclipper, 0, vo_w32_window); | 578 g_lpddclipper->lpVtbl->SetHWnd(g_lpddclipper, 0, vo_w32_window); |
579 } | 579 } |
580 | 580 |
581 /*make sure the overlay is inside the screen*/ | 581 /*make sure the overlay is inside the screen*/ |
582 if (rd.left < 0) | 582 rd.top = FFMAX(rd.top, 0); |
583 rd.left = 0; | 583 rd.left = FFMAX(rd.left, 0); |
584 if (rd.right > vo_screenwidth) | 584 rd.bottom = FFMIN(rd.bottom, vo_screenheight); |
585 rd.right = vo_screenwidth; | 585 rd.right = FFMIN(rd.right, vo_screenwidth); |
586 if (rd.top < 0) | |
587 rd.top = 0; | |
588 if (rd.bottom > vo_screenheight) | |
589 rd.bottom = vo_screenheight; | |
590 | 586 |
591 /*for nonoverlay mode we are finished, for overlay mode we have to display the overlay first*/ | 587 /*for nonoverlay mode we are finished, for overlay mode we have to display the overlay first*/ |
592 if (nooverlay) | 588 if (nooverlay) |
593 return 0; | 589 return 0; |
594 | 590 |