From 36e559462c4a484b5e3ffc9483fede8679528427 Mon Sep 17 00:00:00 2001 From: namedkitten Date: Sun, 12 Apr 2020 14:10:50 +0100 Subject: [PATCH] Fix? --- src/Backends/MPV/MPVBackend.cpp | 7 +++---- src/Backends/MPV/MPVBackend.hpp | 2 +- src/main.cpp | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Backends/MPV/MPVBackend.cpp b/src/Backends/MPV/MPVBackend.cpp index c662873..9610bcf 100644 --- a/src/Backends/MPV/MPVBackend.cpp +++ b/src/Backends/MPV/MPVBackend.cpp @@ -23,10 +23,6 @@ auto mpvLogger = initLogger("mpv"); bool usedirect = false; -void setUseDirect(bool h) { - usedirect = h; -} - namespace { void @@ -143,6 +139,9 @@ MPVBackend::MPVBackend(QQuickItem* parent) if (!mpv) throw std::runtime_error("could not create mpv context"); + std::cout << QString("Direct: ").toUtf8().constData() << QString(usedirect ? "true" : "false").toUtf8().constData(); + + mpv_set_option_string(mpv, "terminal", "on"); mpv_set_option_string(mpv, "msg-level", "all=v"); diff --git a/src/Backends/MPV/MPVBackend.hpp b/src/Backends/MPV/MPVBackend.hpp index 39379f4..c0cc95f 100644 --- a/src/Backends/MPV/MPVBackend.hpp +++ b/src/Backends/MPV/MPVBackend.hpp @@ -15,7 +15,7 @@ #include "src/enums.hpp" #include "src/utils.hpp" -void setUseDirect(bool); +extern bool usedirect; class MpvRenderer; diff --git a/src/main.cpp b/src/main.cpp index e3a9d01..1f9ec4c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -109,7 +109,7 @@ main(int argc, char* argv[]) QSettings settings; - setUseDirect(settings.value("backend/direct", false).toBool()); + usedirect = settings.value("Backend/direct", false).toBool(); Utils::SetDPMS(false);