mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Fix compilation with Qt 5.9
This commit is contained in:
@@ -2,12 +2,12 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QRandomGenerator64>
|
|
||||||
|
|
||||||
#include <openssl/pem.h>
|
#include <openssl/pem.h>
|
||||||
#include <openssl/rsa.h>
|
#include <openssl/rsa.h>
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
|
#include <openssl/rand.h>
|
||||||
|
|
||||||
#define SER_UNIQUEID "uniqueid"
|
#define SER_UNIQUEID "uniqueid"
|
||||||
#define SER_CERT "certificate"
|
#define SER_CERT "certificate"
|
||||||
@@ -195,8 +195,9 @@ IdentityManager::getUniqueId()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Generate a new unique ID in base 16
|
// Generate a new unique ID in base 16
|
||||||
m_CachedUniqueId = QString::number(
|
uint64_t uid;
|
||||||
QRandomGenerator64::securelySeeded().generate64(), 16);
|
RAND_bytes(reinterpret_cast<unsigned char*>(&uid), sizeof(uid));
|
||||||
|
m_CachedUniqueId = QString::number(uid, 16);
|
||||||
|
|
||||||
qDebug() << "Generated new unique ID: " << m_CachedUniqueId;
|
qDebug() << "Generated new unique ID: " << m_CachedUniqueId;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
#include "nvpairingmanager.h"
|
#include "nvpairingmanager.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#include <QRandomGenerator>
|
|
||||||
|
|
||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
#include <openssl/aes.h>
|
#include <openssl/aes.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
#include "video/ffmpeg.h"
|
#include "video/ffmpeg.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QRandomGenerator>
|
#include <openssl/rand.h>
|
||||||
|
|
||||||
#include <QtEndian>
|
#include <QtEndian>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QThreadPool>
|
#include <QThreadPool>
|
||||||
@@ -206,11 +207,12 @@ Session::Session(NvComputer* computer, NvApp& app)
|
|||||||
m_StreamConfig.fps = m_Preferences.fps;
|
m_StreamConfig.fps = m_Preferences.fps;
|
||||||
m_StreamConfig.bitrate = m_Preferences.bitrateKbps;
|
m_StreamConfig.bitrate = m_Preferences.bitrateKbps;
|
||||||
m_StreamConfig.hevcBitratePercentageMultiplier = 75;
|
m_StreamConfig.hevcBitratePercentageMultiplier = 75;
|
||||||
for (unsigned int i = 0; i < sizeof(m_StreamConfig.remoteInputAesKey); i++) {
|
RAND_bytes(reinterpret_cast<unsigned char*>(m_StreamConfig.remoteInputAesKey),
|
||||||
m_StreamConfig.remoteInputAesKey[i] =
|
sizeof(m_StreamConfig.remoteInputAesKey));
|
||||||
(char)(QRandomGenerator::global()->generate() % 256);
|
|
||||||
}
|
// Only the first 4 bytes are populated in the RI key IV
|
||||||
*(int*)m_StreamConfig.remoteInputAesIv = qToBigEndian(QRandomGenerator::global()->generate());
|
RAND_bytes(reinterpret_cast<unsigned char*>(m_StreamConfig.remoteInputAesIv), 4);
|
||||||
|
|
||||||
switch (m_Preferences.audioConfig)
|
switch (m_Preferences.audioConfig)
|
||||||
{
|
{
|
||||||
case StreamingPreferences::AC_AUTO:
|
case StreamingPreferences::AC_AUTO:
|
||||||
|
|||||||
Reference in New Issue
Block a user