Hacky fix for direct setting.
This commit is contained in:
parent
f1c8b4fd7a
commit
e42447d45e
|
@ -23,6 +23,10 @@ auto mpvLogger = initLogger("mpv");
|
||||||
|
|
||||||
bool usedirect = false;
|
bool usedirect = false;
|
||||||
|
|
||||||
|
void setUseDirect(bool h) {
|
||||||
|
usedirect = h;
|
||||||
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -138,8 +142,6 @@ MPVBackend::MPVBackend(QQuickItem* parent)
|
||||||
{
|
{
|
||||||
if (!mpv)
|
if (!mpv)
|
||||||
throw std::runtime_error("could not create mpv context");
|
throw std::runtime_error("could not create mpv context");
|
||||||
QSettings settings;
|
|
||||||
usedirect = settings.value("Backend/direct", false).toBool();
|
|
||||||
|
|
||||||
mpv_set_option_string(mpv, "terminal", "on");
|
mpv_set_option_string(mpv, "terminal", "on");
|
||||||
mpv_set_option_string(mpv, "msg-level", "all=v");
|
mpv_set_option_string(mpv, "msg-level", "all=v");
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
#include "src/enums.hpp"
|
#include "src/enums.hpp"
|
||||||
#include "src/utils.hpp"
|
#include "src/utils.hpp"
|
||||||
|
|
||||||
|
void setUseDirect(bool);
|
||||||
|
|
||||||
class MpvRenderer;
|
class MpvRenderer;
|
||||||
|
|
||||||
class MPVBackend
|
class MPVBackend
|
||||||
|
|
|
@ -109,6 +109,8 @@ main(int argc, char* argv[])
|
||||||
|
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
|
||||||
|
setUseDirect(settings.value("backend/direct", false).toBool());
|
||||||
|
|
||||||
Utils::SetDPMS(false);
|
Utils::SetDPMS(false);
|
||||||
|
|
||||||
QString newpath =
|
QString newpath =
|
||||||
|
|
Loading…
Reference in a new issue