Refuse to stream if Moonlight is known incompatible with the host GFE version

This commit is contained in:
Cameron Gutman
2021-04-30 20:05:38 -05:00
parent b50e5ed7e6
commit 2fbb320539
11 changed files with 164 additions and 3 deletions

View File

@@ -220,7 +220,12 @@ CenteredGridView {
onClicked: {
if (model.online) {
if (model.paired) {
if (!model.serverSupported) {
errorDialog.text = qsTr("The version of GeForce Experience on %1 is not supported by this build of Moonlight. You must update Moonlight to stream from %1.").arg(model.name)
errorDialog.helpText = ""
errorDialog.open()
}
else if (model.paired) {
// go to game view
var component = Qt.createComponent("AppView.qml")
var appView = component.createObject(stackView, {"computerIndex": index, "objectName": model.name})

View File

@@ -42,6 +42,8 @@ QVariant ComputerModel::data(const QModelIndex& index, int role) const
return !computer->macAddress.isEmpty();
case StatusUnknownRole:
return computer->state == NvComputer::CS_UNKNOWN;
case ServerSupportedRole:
return computer->isSupportedServerVersion;
default:
return QVariant();
}
@@ -68,6 +70,7 @@ QHash<int, QByteArray> ComputerModel::roleNames() const
names[BusyRole] = "busy";
names[WakeableRole] = "wakeable";
names[StatusUnknownRole] = "statusUnknown";
names[ServerSupportedRole] = "serverSupported";
return names;
}

View File

@@ -14,7 +14,8 @@ class ComputerModel : public QAbstractListModel
PairedRole,
BusyRole,
WakeableRole,
StatusUnknownRole
StatusUnknownRole,
ServerSupportedRole
};
public: