Move connection establishment to a separate thread to keep the UI responsive

This commit is contained in:
Cameron Gutman 2020-08-10 22:21:54 -07:00
commit d3949806f5
3 changed files with 81 additions and 79 deletions

View file

@ -16,6 +16,7 @@ class Session : public QObject
friend class SdlInputHandler;
friend class DeferredSessionCleanupTask;
friend class AsyncConnectionStartThread;
public:
explicit Session(NvComputer* computer, NvApp& app, StreamingPreferences *preferences = nullptr);
@ -56,6 +57,8 @@ signals:
private:
bool initialize();
bool startConnectionAsync();
bool validateLaunch(SDL_Window* testWindow);
void emitLaunchWarning(QString text);
@ -147,8 +150,8 @@ private:
SDL_SpinLock m_InputHandlerLock;
int m_MouseEmulationRefCount;
int m_TerminationErrorCode;
int m_FailedStageId;
bool m_AsyncConnectionSuccess;
int m_PortTestResults;
int m_ActiveVideoFormat;
int m_ActiveVideoWidth;