summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-10 19:47:54 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-02-10 19:47:54 +0000
commit7c763876c7ed58342f93b54dda3ea53bae44dabc (patch)
tree93ad2d6b43018c0492748d5f9709e7d5e5fcbb54 /libvo
parent1726ba9e05e1e173a24798889ad5d9746666fe1e (diff)
downloadmpv-7c763876c7ed58342f93b54dda3ea53bae44dabc.tar.bz2
mpv-7c763876c7ed58342f93b54dda3ea53bae44dabc.tar.xz
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
Diffstat (limited to 'libvo')
-rw-r--r--libvo/w32_common.c7
1 files changed, 5 insertions, 2 deletions
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");