1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 16:33:02 +00:00

vo_opengl: filter allowed options in dumb-mode

Instead of the other way around of disabling disallowed options. This is
more robust and also slightly simpler, at least conceptually. If new
vo_opengl features are added, they don't need to be explicitly disabled
for dumb-mode just to avoid that it accidentally breaks.
This commit is contained in:
wm4 2015-09-08 22:55:01 +02:00
parent ab6f6aa61e
commit f622f9d3a3

View File

@ -2399,21 +2399,21 @@ static void check_gl_features(struct gl_video *p)
MP_WARN(p, "High bit depth FBOs unsupported. Enabling dumb mode.\n" MP_WARN(p, "High bit depth FBOs unsupported. Enabling dumb mode.\n"
"Most extended features will be disabled.\n"); "Most extended features will be disabled.\n");
} }
p->opts.dumb_mode = 1;
for (int n = 0; n < 4; n++)
p->opts.scaler[n].kernel.name = "bilinear";
p->use_lut_3d = false; p->use_lut_3d = false;
p->opts.dither_algo = -1; // Most things don't work, so whitelist all options that still work.
p->opts.interpolation = 0; struct gl_video_opts new_opts = {
p->opts.blend_subs = 0; .gamma = p->opts.gamma,
p->opts.linear_scaling = 0; .gamma_auto = p->opts.gamma_auto,
p->opts.sigmoid_upscaling = 0; .pbo = p->opts.pbo,
p->opts.target_prim = MP_CSP_PRIM_AUTO; .fbo_format = p->opts.fbo_format,
p->opts.target_trc = MP_CSP_TRC_AUTO; .alpha_mode = p->opts.alpha_mode,
talloc_free(p->opts.source_shader); p->opts.source_shader = NULL; .chroma_location = p->opts.chroma_location,
talloc_free(p->opts.scale_shader); p->opts.scale_shader = NULL; .use_rectangle = p->opts.use_rectangle,
talloc_free(p->opts.pre_shaders); p->opts.pre_shaders = NULL; .background = p->opts.background,
talloc_free(p->opts.post_shaders); p->opts.post_shaders = NULL; .dither_algo = -1,
.dumb_mode = 1,
};
assign_options(&p->opts, &new_opts);
return; return;
} }