1
0
Fork 0

Hacky fix for direct setting.

This commit is contained in:
namedkitten 2020-04-12 13:57:06 +01:00
parent f1c8b4fd7a
commit e42447d45e
3 changed files with 8 additions and 2 deletions

View file

@ -23,6 +23,10 @@ auto mpvLogger = initLogger("mpv");
bool usedirect = false;
void setUseDirect(bool h) {
usedirect = h;
}
namespace {
void
@ -138,8 +142,6 @@ MPVBackend::MPVBackend(QQuickItem* parent)
{
if (!mpv)
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, "msg-level", "all=v");

View file

@ -15,6 +15,8 @@
#include "src/enums.hpp"
#include "src/utils.hpp"
void setUseDirect(bool);
class MpvRenderer;
class MPVBackend

View file

@ -109,6 +109,8 @@ main(int argc, char* argv[])
QSettings settings;
setUseDirect(settings.value("backend/direct", false).toBool());
Utils::SetDPMS(false);
QString newpath =