mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-09-02 15:46:50 +00:00
feat: install only not wait
This commit is contained in:
parent
c2a3aa106b
commit
0af13110eb
2 changed files with 7 additions and 3 deletions
|
@ -59,10 +59,10 @@ void AudioOutput::stop()
|
|||
|
||||
void AudioOutput::installonly(const QString &serial, int port)
|
||||
{
|
||||
runSndcpyProcess(serial, port);
|
||||
runSndcpyProcess(serial, port, false);
|
||||
}
|
||||
|
||||
bool AudioOutput::runSndcpyProcess(const QString &serial, int port)
|
||||
bool AudioOutput::runSndcpyProcess(const QString &serial, int port, bool wait)
|
||||
{
|
||||
if (QProcess::NotRunning != m_sndcpy.state()) {
|
||||
m_sndcpy.kill();
|
||||
|
@ -81,6 +81,10 @@ bool AudioOutput::runSndcpyProcess(const QString &serial, int port)
|
|||
m_sndcpy.start("bash", params);
|
||||
#endif
|
||||
|
||||
if (!wait) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!m_sndcpy.waitForStarted()) {
|
||||
qWarning() << "AudioOutput::start sndcpy.bat failed";
|
||||
return false;
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
void installonly(const QString& serial, int port);
|
||||
|
||||
private:
|
||||
bool runSndcpyProcess(const QString& serial, int port);
|
||||
bool runSndcpyProcess(const QString& serial, int port, bool wait = true);
|
||||
void startAudioOutput();
|
||||
void stopAudioOutput();
|
||||
void startRecvData(int port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue