1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-11 09:25:56 +00:00

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
This commit is contained in:
reimar 2008-02-10 19:47:54 +00:00
parent 1726ba9e05
commit 7c763876c7

View File

@ -43,8 +43,11 @@ static BOOL (WINAPI* myEnumDisplayMonitors)(HDC, LPCRECT, MONITORENUMPROC, LPARA
static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
RECT r; RECT r;
POINT p; 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) { switch (message) {
case WM_ERASEBKGND: // no need to erase background seperately
return 1;
case WM_PAINT: case WM_PAINT:
event_flags |= VO_EVENT_EXPOSE; event_flags |= VO_EVENT_EXPOSE;
break; break;
@ -375,7 +378,7 @@ int vo_w32_init(void) {
mplayerIcon = LoadIcon(0, IDI_APPLICATION); 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)) { if (!RegisterClassEx(&wcex)) {
mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to register window class!\n"); mp_msg(MSGT_VO, MSGL_ERR, "vo: win32: unable to register window class!\n");