mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-01 15:26:09 +00:00
Defer launch warnings until after launch validation
We need to destroy the SDL window before we can be sure that Qt can draw to the screen if we used KMSDRM.
This commit is contained in:
parent
0e2d5bf441
commit
6d023c2dfa
@ -902,11 +902,10 @@ bool Session::initialize()
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Session::emitLaunchWarning(QString text)
|
||||
{
|
||||
// Display launch warnings in Qt only after destroying SDL's window.
|
||||
// This avoids conflicts between the windows on display subsystems
|
||||
// such as KMSDRM that only support a single window.
|
||||
for (const auto &text : m_LaunchWarnings) {
|
||||
// Emit the warning to the UI
|
||||
emit displayLaunchWarning(text);
|
||||
|
||||
@ -923,6 +922,15 @@ void Session::emitLaunchWarning(QString text)
|
||||
QCoreApplication::sendPostedEvents();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Session::emitLaunchWarning(QString text)
|
||||
{
|
||||
// Queue this launch warning to be displayed after validation
|
||||
m_LaunchWarnings.append(text);
|
||||
}
|
||||
|
||||
bool Session::validateLaunch(SDL_Window* testWindow)
|
||||
|
@ -260,6 +260,7 @@ private:
|
||||
SdlInputHandler* m_InputHandler;
|
||||
int m_MouseEmulationRefCount;
|
||||
int m_FlushingWindowEventsRef;
|
||||
QList<QString> m_LaunchWarnings;
|
||||
|
||||
bool m_AsyncConnectionSuccess;
|
||||
int m_PortTestResults;
|
||||
|
Loading…
x
Reference in New Issue
Block a user