[MPlayer-cvslog] r25976 - trunk/libvo/w32_common.c

reimar subversion at mplayerhq.hu
Sun Feb 10 20:47:54 CET 2008


Author: reimar
Date: Sun Feb 10 20:47:54 2008
New Revision: 25976

Log:
Do not uselessly erase background, OpenGL will take care of drawing everything.

Modified:
   trunk/libvo/w32_common.c

Modified: trunk/libvo/w32_common.c
==============================================================================
--- trunk/libvo/w32_common.c	(original)
+++ trunk/libvo/w32_common.c	Sun Feb 10 20:47:54 2008
@@ -43,8 +43,11 @@ static BOOL (WINAPI* myEnumDisplayMonito
 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");



More information about the MPlayer-cvslog mailing list