mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
vo_gpu: simplify opengl alias
This makes the replacement warning message worse, but I don't think I care enough.
This commit is contained in:
parent
b43bf12fa6
commit
cdef69103a
@ -52,7 +52,6 @@ extern const struct vo_driver video_out_x11;
|
||||
extern const struct vo_driver video_out_vdpau;
|
||||
extern const struct vo_driver video_out_xv;
|
||||
extern const struct vo_driver video_out_gpu;
|
||||
extern const struct vo_driver video_out_opengl;
|
||||
extern const struct vo_driver video_out_opengl_cb;
|
||||
extern const struct vo_driver video_out_null;
|
||||
extern const struct vo_driver video_out_image;
|
||||
@ -106,7 +105,6 @@ const struct vo_driver *const video_out_drivers[] =
|
||||
&video_out_lavc,
|
||||
#endif
|
||||
#if HAVE_GL
|
||||
&video_out_opengl,
|
||||
&video_out_opengl_cb,
|
||||
#endif
|
||||
NULL
|
||||
@ -196,8 +194,9 @@ const struct m_obj_list vo_obj_list = {
|
||||
.get_desc = get_desc,
|
||||
.description = "video outputs",
|
||||
.aliases = {
|
||||
{"gl", "opengl"},
|
||||
{"gl", "gpu"},
|
||||
{"direct3d_shaders", "direct3d"},
|
||||
{"opengl", "gpu"},
|
||||
{0}
|
||||
},
|
||||
.allow_unknown_entries = true,
|
||||
|
@ -349,31 +349,3 @@ const struct vo_driver video_out_gpu = {
|
||||
.priv_defaults = &defaults,
|
||||
.options = options,
|
||||
};
|
||||
|
||||
static int preinit_opengl(struct vo *vo)
|
||||
{
|
||||
MP_WARN(vo, "--vo=opengl was replaced by --vo=gpu --gpu-api=opengl, and will"
|
||||
" be removed in the future!\n");
|
||||
|
||||
struct gpu_priv *p = vo->priv;
|
||||
p->force_gl = true;
|
||||
return preinit(vo);
|
||||
}
|
||||
|
||||
const struct vo_driver video_out_opengl = {
|
||||
.description = "Shader-based GPU Renderer",
|
||||
.name = "opengl",
|
||||
.caps = VO_CAP_ROTATE90,
|
||||
.preinit = preinit_opengl,
|
||||
.query_format = query_format,
|
||||
.reconfig = reconfig,
|
||||
.control = control,
|
||||
.get_image = get_image,
|
||||
.draw_frame = draw_frame,
|
||||
.flip_page = flip_page,
|
||||
.wait_events = wait_events,
|
||||
.wakeup = wakeup,
|
||||
.uninit = uninit,
|
||||
.priv_size = sizeof(struct gpu_priv),
|
||||
.priv_defaults = &defaults,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user