[MPlayer-cvslog] r35155 - trunk/libvo/vo_directx.c
reimar
subversion at mplayerhq.hu
Fri Sep 7 21:35:52 CEST 2012
Author: reimar
Date: Fri Sep 7 21:35:52 2012
New Revision: 35155
Log:
Ensure the borders are cleared when zooming out from panscan.
Modified:
trunk/libvo/vo_directx.c
Modified: trunk/libvo/vo_directx.c
==============================================================================
--- trunk/libvo/vo_directx.c Fri Sep 7 21:27:44 2012 (r35154)
+++ trunk/libvo/vo_directx.c Fri Sep 7 21:35:52 2012 (r35155)
@@ -451,6 +451,15 @@ static uint32_t Directx_InitDirectDraw(v
return 0;
}
+static void clear_window(void)
+{
+ HDC dc = vo_w32_get_dc(vo_w32_window);
+ RECT r;
+ GetClientRect(vo_w32_window, &r);
+ FillRect(dc, &r, vo_fs || vidmode ? blackbrush : colorbrush);
+ vo_w32_release_dc(vo_w32_window, dc);
+}
+
static uint32_t Directx_ManageDisplay(void)
{
HRESULT ddrval;
@@ -478,6 +487,9 @@ static uint32_t Directx_ManageDisplay(vo
if(nooverlay) {
g_lpddclipper->lpVtbl->SetHWnd(g_lpddclipper, 0, vo_w32_window);
+ // clear borders. FIXME: this causes flickering
+ if (width < vo_dwidth || height < vo_dheight)
+ clear_window();
// For nooverlay we are done, the blitter can handle
// a destination RECT larger than the window.
return 0;
@@ -609,13 +621,8 @@ static void check_events(void)
int evt = vo_w32_check_events();
if (evt & (VO_EVENT_RESIZE | VO_EVENT_MOVE))
Directx_ManageDisplay();
- if (evt & (VO_EVENT_RESIZE | VO_EVENT_MOVE | VO_EVENT_EXPOSE)) {
- HDC dc = vo_w32_get_dc(vo_w32_window);
- RECT r;
- GetClientRect(vo_w32_window, &r);
- FillRect(dc, &r, vo_fs || vidmode ? blackbrush : colorbrush);
- vo_w32_release_dc(vo_w32_window, dc);
- }
+ if (evt & (VO_EVENT_RESIZE | VO_EVENT_MOVE | VO_EVENT_EXPOSE))
+ clear_window();
}
//find out supported overlay pixelformats
More information about the MPlayer-cvslog
mailing list