OpenVR compat configurable in dashboard

This commit is contained in:
Patrick Nicolas
2025-04-29 19:40:36 +02:00
parent acd35e3ebd
commit e759b93d69
3 changed files with 113 additions and 1 deletions
+6
View File
@@ -123,6 +123,9 @@ class Settings : public QObject
Q_PROPERTY(float scale READ scale WRITE set_scale NOTIFY scaleChanged)
Q_PROPERTY(QString application READ application WRITE set_application NOTIFY applicationChanged)
Q_PROPERTY(bool tcpOnly READ tcpOnly WRITE set_tcpOnly NOTIFY tcpOnlyChanged)
Q_PROPERTY(QString openvr READ openvr WRITE set_openvr NOTIFY openvrChanged)
Q_PROPERTY(bool flatpak READ flatpak CONSTANT)
SETTER_GETTER_NOTIFY(bool, manualEncoders)
SETTER_GETTER_NOTIFY(std::vector<encoder>, encoders)
@@ -131,6 +134,7 @@ class Settings : public QObject
SETTER_GETTER_NOTIFY(float, scale)
SETTER_GETTER_NOTIFY(QString, application)
SETTER_GETTER_NOTIFY(bool, tcpOnly)
SETTER_GETTER_NOTIFY(QString, openvr)
public:
Settings(QObject * parent = nullptr) :
@@ -141,6 +145,8 @@ public:
Q_INVOKABLE void restore_defaults();
Q_INVOKABLE void set_encoder_preset(QJSValue preset);
bool flatpak() const;
static std::optional<encoder::encoder_name> encoder_id_from_string(std::string_view s);
static std::optional<encoder::video_codec> codec_id_from_string(std::string_view s);
static const std::string & encoder_from_id(std::optional<encoder::encoder_name> id);