mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-13 21:02:28 +00:00
Reduce UI jank when transitioning to the stream segue
This commit is contained in:
parent
b8169ae08b
commit
cfbcc4093c
2 changed files with 14 additions and 2 deletions
|
@ -278,6 +278,11 @@ Session::Session(NvComputer* computer, NvApp& app)
|
|||
m_DisplayOriginX(0),
|
||||
m_DisplayOriginY(0),
|
||||
m_PendingWindowedTransition(false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Session::initialize()
|
||||
{
|
||||
qDebug() << "Server GPU:" << m_Computer->gpuModel;
|
||||
|
||||
|
@ -366,14 +371,14 @@ Session::Session(NvComputer* computer, NvApp& app)
|
|||
break;
|
||||
}
|
||||
|
||||
if (computer->activeAddress == computer->remoteAddress) {
|
||||
if (m_Computer->activeAddress == m_Computer->remoteAddress) {
|
||||
m_StreamConfig.streamingRemotely = 1;
|
||||
}
|
||||
else {
|
||||
m_StreamConfig.streamingRemotely = 0;
|
||||
}
|
||||
|
||||
if (computer->activeAddress == computer->localAddress) {
|
||||
if (m_Computer->activeAddress == m_Computer->localAddress) {
|
||||
m_StreamConfig.packetSize = 1392;
|
||||
}
|
||||
else {
|
||||
|
@ -701,6 +706,11 @@ void Session::exec(int displayOriginX, int displayOriginY)
|
|||
m_DisplayOriginX = displayOriginX;
|
||||
m_DisplayOriginY = displayOriginY;
|
||||
|
||||
// Complete initialization in this deferred context to avoid
|
||||
// calling expensive functions in the constructor (during the
|
||||
// process of loading the StreamSegue).
|
||||
initialize();
|
||||
|
||||
// Check for validation errors/warnings and emit
|
||||
// signals for them, if appropriate
|
||||
if (!validateLaunch()) {
|
||||
|
|
|
@ -41,6 +41,8 @@ signals:
|
|||
void displayLaunchWarning(QString text);
|
||||
|
||||
private:
|
||||
void initialize();
|
||||
|
||||
bool validateLaunch();
|
||||
|
||||
void emitLaunchWarning(QString text);
|
||||
|
|
Loading…
Reference in a new issue