From 3a59612cb787ecad16a188222105a96b060659fa Mon Sep 17 00:00:00 2001 From: Kubat <mael.martin31@gmail.com> Date: Sat, 18 Apr 2020 15:52:04 +0200 Subject: [PATCH] Clean the code again --- src/module/module_sdl2.c | 24 +----------------------- src/module/mpv.c | 2 +- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/src/module/module_sdl2.c b/src/module/module_sdl2.c index 4944e3d3..c0195c9c 100644 --- a/src/module/module_sdl2.c +++ b/src/module/module_sdl2.c @@ -166,7 +166,7 @@ module_sdl2_new(struct lkt_win *const win) .get_proc_address = get_proc_address_mpv, } }, - { + { // Can't use mpv_command with that thing, should change to mpv_command_async MPV_RENDER_PARAM_ADVANCED_CONTROL, &(int) { 1 @@ -179,28 +179,6 @@ module_sdl2_new(struct lkt_win *const win) if (init_mpv_gl__(sdl2->mpv, &sdl2->mpv_gl, params)) goto error; - if (sdl2->mpv == NULL && init_mpv__(&sdl2->mpv)) - goto error; - - if (sdl2->mpv_gl == NULL) { - mpv_render_param params[] = { { MPV_RENDER_PARAM_API_TYPE, MPV_RENDER_API_TYPE_OPENGL }, { - MPV_RENDER_PARAM_OPENGL_INIT_PARAMS, &(mpv_opengl_init_params) - { - .get_proc_address = get_proc_address_mpv, - } - }, - { - MPV_RENDER_PARAM_ADVANCED_CONTROL, &(int) - { - 1 - } - }, - {0} - }; - if (init_mpv_gl__(sdl2->mpv, &sdl2->mpv_gl, params)) - goto error; - } - SDL_SetWindowTitle(sdl2->window, "Lektord"); SDL_DisableScreenSaver(); win->window = sdl2; diff --git a/src/module/mpv.c b/src/module/mpv.c index f5c1aaee..31cad22a 100644 --- a/src/module/mpv.c +++ b/src/module/mpv.c @@ -63,7 +63,7 @@ lmpv_prepare(void) } if ((status = mpv_set_option_string(ctx, "profile", "low-latency")) < 0) { - fprintf(stderr, " ! lmpv_new: failed to set demuxer-max-bytes: %s\n", + fprintf(stderr, " ! lmpv_new: failed to set low-latency: %s\n", mpv_error_string(status)); return NULL; } -- GitLab