diff -Naur -wbBE -X ignore_list main-cvs/DOCS/man/en/mplayer.1 main-devel/DOCS/man/en/mplayer.1 --- main-cvs/DOCS/man/en/mplayer.1 2004-12-13 17:05:04.000000000 +0800 +++ main-devel/DOCS/man/en/mplayer.1 2004-12-14 14:30:42.000000000 +0800 @@ -2497,6 +2497,8 @@ .IPs noaccel Turns off hardware acceleration. Try this option if you have display problems. +.IPs noborder +Makes the video window borderless. .RE .PD 1 . diff -Naur -wbBE -X ignore_list main-cvs/libvo/vo_directx.c main-devel/libvo/vo_directx.c --- main-cvs/libvo/vo_directx.c 2004-11-01 17:06:31.000000000 +0800 +++ main-devel/libvo/vo_directx.c 2004-12-14 14:28:08.000000000 +0800 @@ -63,6 +63,7 @@ static uint32_t vm_bpp=0; static uint32_t dstride; //surface stride static uint32_t nooverlay = 0; //NonOverlay mode +static uint32_t noborder = 0; //Borderless window static DWORD destcolorkey; //colorkey for our surface static COLORREF windowcolor = RGB(0,0,16); //windowcolor == colorkey static int adapter_count=0; @@ -70,6 +71,7 @@ static GUID *selected_guid_ptr = NULL; static RECT monitor_rect; //monitor coordinates static float window_aspect; +static DWORD wndStyle; //Window style extern void mplayer_put_key(int code); //let mplayer handel the keyevents extern void vo_draw_text(int dxs,int dys,void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride)); @@ -627,7 +629,7 @@ if(!vidmode && !vo_fs){ RECT rdw=rd; - AdjustWindowRect(&rdw,WS_OVERLAPPEDWINDOW|WS_SIZEBOX,FALSE); + AdjustWindowRect(&rdw,wndStyle,FALSE); // printf("window: %i %i %ix%i\n",rdw.left,rdw.top,rdw.right - rdw.left,rdw.bottom - rdw.top); rdw.left += monitor_rect.left; /* move to global coordinate space */ rdw.top += monitor_rect.top; @@ -963,11 +965,20 @@ WNDCLASS wc; if(arg) { - if(strstr(arg,"noaccel")) - { + while (*arg != '\0') { + if (!strncmp(arg, ":", 1)) { + arg++; + continue; /* multiple ':' is not really an error */ + } else if (!strncmp(arg, "noaccel", 7)) { + arg += 7; mp_msg(MSGT_VO,MSGL_V,"disabled overlay\n"); nooverlay = 1; + } else if (!strncmp(arg, "noborder", 8)) { + arg += 8; + mp_msg(MSGT_VO,MSGL_V,"hide border\n"); + noborder = 1; } + } /* end while */ } /*load icon from the main app*/ if(GetModuleFileName(NULL,exedir,MAX_PATH)) @@ -989,8 +1000,9 @@ wc.lpszClassName = "MPlayer - The Movie Player"; wc.lpszMenuName = NULL; RegisterClass(&wc); + wndStyle = (vidmode||noborder)?WS_POPUP:(WS_OVERLAPPEDWINDOW|WS_SIZEBOX); hWnd = CreateWindowEx(vidmode?WS_EX_TOPMOST:0, - "MPlayer - The Movie Player","",(vidmode)?WS_POPUP:WS_OVERLAPPEDWINDOW| WS_SIZEBOX, + "MPlayer - The Movie Player","",wndStyle, CW_USEDEFAULT, CW_USEDEFAULT, 100, 100,NULL,NULL,hInstance,NULL); wc.hbrBackground = CreateSolidBrush(RGB(0,0,0)); wc.lpszClassName = "MPlayer - Fullscreen"; @@ -1228,7 +1240,7 @@ rd.top = vo_dy; rd.right = rd.left + d_image_width; rd.bottom = rd.top + d_image_height; - AdjustWindowRect(&rd,WS_OVERLAPPEDWINDOW|WS_SIZEBOX,FALSE); + AdjustWindowRect(&rd,wndStyle,FALSE); SetWindowPos(hWnd,NULL, vo_dx, vo_dy,rd.right-rd.left,rd.bottom-rd.top,SWP_SHOWWINDOW|SWP_NOOWNERZORDER); } else ShowWindow(hWnd,SW_SHOW);