mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-03 22:28:39 +00:00
修复tunnelForward连接失败问题
This commit is contained in:
parent
7e30b69747
commit
f9b31f420e
1 changed files with 47 additions and 37 deletions
|
@ -178,6 +178,8 @@ bool Server::connectTo()
|
|||
return true;
|
||||
}
|
||||
|
||||
// device server need time to start
|
||||
QTimer::singleShot(600, this, [this](){
|
||||
QString deviceName;
|
||||
QSize deviceSize;
|
||||
bool success = false;
|
||||
|
@ -220,7 +222,9 @@ bool Server::connectTo()
|
|||
stop();
|
||||
}
|
||||
emit connectToResult(success, deviceName, deviceSize);
|
||||
return success;
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Server::timerEvent(QTimerEvent *event)
|
||||
|
@ -354,7 +358,13 @@ void Server::onWorkProcessResult(AdbProcess::ADB_EXEC_RESULT processResult)
|
|||
case SSS_PUSH:
|
||||
if (AdbProcess::AER_SUCCESS_EXEC == processResult) {
|
||||
m_serverCopiedToDevice = true;
|
||||
#if 1
|
||||
m_serverStartStep = SSS_ENABLE_TUNNEL_REVERSE;
|
||||
#else
|
||||
// test tunnelForward
|
||||
//m_tunnelForward = true;
|
||||
//m_serverStartStep = SSS_ENABLE_TUNNEL_FORWARD;
|
||||
#endif
|
||||
startServerByStep();
|
||||
} else if (AdbProcess::AER_SUCCESS_START != processResult){
|
||||
qCritical("adb push");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue