changeset 25944:8a1c062707ff

Do not uselessly erase background, OpenGL will take care of drawing everything.
author reimar
date Sun, 10 Feb 2008 19:47:54 +0000
parents 5fe1bf7f1bfe
children 491e43b45aa9
files libvo/w32_common.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/w32_common.c	Sun Feb 10 19:37:18 2008 +0000
+++ b/libvo/w32_common.c	Sun Feb 10 19:47:54 2008 +0000
@@ -43,8 +43,11 @@
 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 @@
         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");