mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-25 13:31:41 +00:00
Handle unexpected appVersion/gfeVersion quads
This commit is contained in:
1 parent
1826d4c232
commit
0c4f7aefb6
2 files changed
+3
-4
No files matched your search
@@ -215,7 +215,7 @@ NvPairingManager::saltPin(const QByteArray& salt, QString pin)
|
||||
NvPairingManager::PairState
|
||||
NvPairingManager::pair(QString appVersion, QString pin, QSslCertificate& serverCert)
|
||||
{
|
||||
int serverMajorVersion = NvHTTP::parseQuad(appVersion).at(0);
|
||||
int serverMajorVersion = NvHTTP::parseQuad(appVersion).value(0);
|
||||
qInfo() << "Pairing with server generation:" << serverMajorVersion;
|
||||
|
||||
QCryptographicHash::Algorithm hashAlgo;
|
||||
|
||||
@@ -840,9 +840,8 @@ bool Session::initialize(QQuickWindow* qtWindow)
|
||||
// to allow decoding via VideoToolbox on macOS. Since we don't
|
||||
// have fixup code for HEVC, just avoid it if GFE is too old.
|
||||
QVector<int> gfeVersion = NvHTTP::parseQuad(m_Computer->gfeVersion);
|
||||
if (gfeVersion.isEmpty() || // Very old versions don't have GfeVersion at all
|
||||
gfeVersion[0] < 3 ||
|
||||
(gfeVersion[0] == 3 && gfeVersion[1] < 11)) {
|
||||
if (gfeVersion.value(0) < 3 ||
|
||||
(gfeVersion.value(0) == 3 && gfeVersion.value(1) < 11)) {
|
||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Disabling HEVC on macOS due to old GFE version");
|
||||
m_SupportedVideoFormats.removeByMask(VIDEO_FORMAT_MASK_H265);
|
||||
|
||||
Reference in new issue
Block a user