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;
|
||||
|
||||
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");
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include "src/enums.hpp"
|
||||
#include "src/utils.hpp"
|
||||
|
||||
void setUseDirect(bool);
|
||||
|
||||
class MpvRenderer;
|
||||
|
||||
class MPVBackend
|
||||
|
|
|
@ -109,6 +109,8 @@ main(int argc, char* argv[])
|
|||
|
||||
QSettings settings;
|
||||
|
||||
setUseDirect(settings.value("backend/direct", false).toBool());
|
||||
|
||||
Utils::SetDPMS(false);
|
||||
|
||||
QString newpath =
|
||||
|
|
Loading…
Reference in a new issue