From 7c763876c7ed58342f93b54dda3ea53bae44dabc Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 10 Feb 2008 19:47:54 +0000 Subject: Do not uselessly erase background, OpenGL will take care of drawing everything. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25976 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/w32_common.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libvo') diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 3fcc24086e..3c66c5a799 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -43,8 +43,11 @@ static BOOL (WINAPI* myEnumDisplayMonitors)(HDC, LPCRECT, MONITORENUMPROC, LPARA static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { RECT r; POINT p; - if (WinID < 0 || message == WM_PAINT || message == WM_SIZE) { + if (WinID < 0 || message == WM_PAINT || message == WM_ERASEBKGND || + message == WM_SIZE) { switch (message) { + case WM_ERASEBKGND: // no need to erase background seperately + return 1; case WM_PAINT: event_flags |= VO_EVENT_EXPOSE; break; @@ -375,7 +378,7 @@ int vo_w32_init(void) { mplayerIcon = LoadIcon(0, IDI_APPLICATION); { - WNDCLASSEX wcex = { sizeof wcex, CS_OWNDC | CS_DBLCLKS, WndProc, 0, 0, hInstance, mplayerIcon, LoadCursor(0, IDC_ARROW), (HBRUSH)GetStockObject(BLACK_BRUSH), 0, classname, mplayerIcon }; + WNDCLASSEX wcex = { sizeof wcex, CS_OWNDC | CS_DBLCLKS, WndProc, 0, 0, hInstance, mplayerIcon, LoadCursor(0, IDC_ARROW), NULL, 0, classname, mplayerIcon }; if (!RegisterClassEx(&wcex)) { mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to register window class!\n"); -- cgit v1.2.3