summaryrefslogtreecommitdiffstats
path: root/player/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'player/main.c')
-rw-r--r--player/main.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/player/main.c b/player/main.c
index b60c522cb0..5f20ae9891 100644
--- a/player/main.c
+++ b/player/main.c
@@ -134,6 +134,16 @@ static const char def_config[] =
"osc=no\n"
"framedrop=no\n"
#endif
+ "\n"
+ "[opengl-hq]\n"
+ "scale=spline36\n"
+ "cscale=spline36\n"
+ "dscale=mitchell\n"
+ "dither-depth=auto\n"
+ "correct-downscaling=yes\n"
+ "sigmoid-upscaling=yes\n"
+ "deband=yes\n"
+ "opengl-es=no\n"
;
static pthread_mutex_t terminal_owner_lock = PTHREAD_MUTEX_INITIALIZER;
@@ -314,6 +324,21 @@ static bool handle_help_options(struct MPContext *mpctx)
return opt_exit;
}
+static void handle_deprecated_options(struct MPContext *mpctx)
+{
+ struct MPOpts *opts = mpctx->opts;
+ struct m_obj_settings *vo = opts->vo->video_driver_list;
+ if (vo && vo->name && strcmp(vo->name, "opengl-hq") == 0) {
+ MP_WARN(mpctx,
+ "--vo=opengl-hq is deprecated! Use --profile=opengl-hq instead.\n");
+ // Fudge it. This will replace the --vo option too, which is why we
+ // unset/safe it, and later restore it.
+ talloc_free(vo->name);
+ vo->name = talloc_strdup(NULL, "opengl");
+ m_config_set_profile(mpctx->mconfig, "opengl-hq", 0);
+ }
+}
+
static int cfg_include(void *ctx, char *filename, int flags)
{
struct MPContext *mpctx = ctx;
@@ -425,6 +450,8 @@ int mp_initialize(struct MPContext *mpctx, char **options)
if (handle_help_options(mpctx))
return -2;
+ handle_deprecated_options(mpctx);
+
if (!print_libav_versions(mp_null_log, 0)) {
// Using mismatched libraries can be legitimate, but even then it's
// a bad idea. We don't acknowledge its usefulness and stability.