From 7985d4fd3452ba5feed240ab86ba1c088547e98e Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 28 Oct 2012 20:32:55 +0100 Subject: [PATCH] options: remove --adapter This probably didn't do anything. Maybe OpenGL VOs on win32 actually could make use of it, but even then it probably didn't work. --- DOCS/man/en/options.rst | 5 ----- cfg-mplayer.h | 1 - libvo/video_out.c | 1 - libvo/video_out.h | 1 - libvo/w32_common.c | 23 ----------------------- libvo/w32_common.h | 3 --- 6 files changed, 34 deletions(-) diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 0fb150e44e..c846dde4aa 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -29,11 +29,6 @@ others. :``--ac=-ffmp3,``: Skip FFmpeg's MP3 decoder. ---adapter= - Set the graphics card that will receive the image. You can get a list of - available cards when you run this option with ``-v``. Currently only works - with the directx video output driver. - --af= Specify a list of audio filters to apply to the audio stream. See :ref:`audio_filters` for details and descriptions of the available filters. diff --git a/cfg-mplayer.h b/cfg-mplayer.h index 1a6a41586d..4e23613916 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -642,7 +642,6 @@ const m_option_t mplayer_opts[]={ {"grabpointer", &vo_grabpointer, CONF_TYPE_FLAG, 0, 0, 1, NULL}, OPT_INTRANGE("cursor-autohide-delay", cursor_autohide_delay, 0, -2, 30000), - {"adapter", &vo_adapter_num, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL}, {"refreshrate",&vo_refresh_rate,CONF_TYPE_INT,CONF_RANGE, 0,100, NULL}, {"wid", &WinID, CONF_TYPE_INT64, 0, 0, 0, NULL}, #ifdef CONFIG_X11 diff --git a/libvo/video_out.c b/libvo/video_out.c index 7e1360ecf5..d095ca530c 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -55,7 +55,6 @@ int vo_vsync = 1; int vo_fs = 0; int vo_fsmode = 0; float vo_panscan = 0.0f; -int vo_adapter_num=0; int vo_refresh_rate=0; int vo_keepaspect=1; int vo_rootwin=0; diff --git a/libvo/video_out.h b/libvo/video_out.h index a36c56aa90..539a9b5043 100644 --- a/libvo/video_out.h +++ b/libvo/video_out.h @@ -316,7 +316,6 @@ extern int vo_vsync; extern int vo_fs; extern int vo_fsmode; extern float vo_panscan; -extern int vo_adapter_num; extern int vo_refresh_rate; extern int vo_keepaspect; extern int vo_rootwin; diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 6136730fbd..f60f5328de 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -595,20 +595,6 @@ int vo_w32_config(struct vo *vo, uint32_t width, uint32_t height, return reinit_window_state(vo); } -/** - * \brief return the name of the selected device if it is indepedant - * \return pointer to string, must be freed. - */ -static wchar_t *get_display_name(void) -{ - DISPLAY_DEVICEW disp; - disp.cb = sizeof(disp); - EnumDisplayDevicesW(NULL, vo_adapter_num, &disp, 0); - if (disp.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) - return NULL; - return wcsdup(disp.DeviceName); -} - /** * \brief Initialize w32_common framework. * @@ -680,10 +666,6 @@ int vo_w32_init(struct vo *vo) if (WinID >= 0) EnableWindow(w32->window, 0); - w32->dev_hdc = 0; - wchar_t *dev = get_display_name(); - if (dev) w32->dev_hdc = CreateDCW(dev, NULL, NULL, NULL); - free(dev); updateScreenProperties(vo); mp_msg(MSGT_VO, MSGL_V, "vo: win32: running at %dx%d with depth %d\n", @@ -746,7 +728,6 @@ void vo_w32_uninit(struct vo *vo) return; resetMode(vo); ShowCursor(1); - if (w32->dev_hdc) DeleteDC(w32->dev_hdc); DestroyWindow(w32->window); UnregisterClassW(classname, 0); talloc_free(w32); @@ -761,8 +742,6 @@ void vo_w32_uninit(struct vo *vo) HDC vo_w32_get_dc(struct vo *vo, HWND wnd) { struct vo_w32_state *w32 = vo->w32; - if (w32->dev_hdc) - return w32->dev_hdc; return GetDC(wnd); } @@ -774,7 +753,5 @@ HDC vo_w32_get_dc(struct vo *vo, HWND wnd) void vo_w32_release_dc(struct vo *vo, HWND wnd, HDC dc) { struct vo_w32_state *w32 = vo->w32; - if (w32->dev_hdc) - return; ReleaseDC(wnd, dc); } diff --git a/libvo/w32_common.h b/libvo/w32_common.h index 1e4bd604a0..c6d9fc7653 100644 --- a/libvo/w32_common.h +++ b/libvo/w32_common.h @@ -26,9 +26,6 @@ struct vo_w32_state { HWND window; - // HDC used when rendering to a device instead of window - HDC dev_hdc; - bool vm; int depthonscreen;