mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-25 16:48:44 +02:00
Fix Audacity failing silently on new instance
Should now behave the same on Linux as on Windows.
This commit is contained in:
parent
0248c870b2
commit
837d5e18f3
@ -1902,6 +1902,8 @@ bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir)
|
|||||||
// Connect to the existing Audacity
|
// Connect to the existing Audacity
|
||||||
sock->Connect(addr, true);
|
sock->Connect(addr, true);
|
||||||
if (sock->IsConnected())
|
if (sock->IsConnected())
|
||||||
|
{
|
||||||
|
if (parser->GetParamCount() > 0)
|
||||||
{
|
{
|
||||||
for (size_t i = 0, cnt = parser->GetParamCount(); i < cnt; i++)
|
for (size_t i = 0, cnt = parser->GetParamCount(); i < cnt; i++)
|
||||||
{
|
{
|
||||||
@ -1909,8 +1911,14 @@ bool AudacityApp::CreateSingleInstanceChecker(const wxString &dir)
|
|||||||
wxString param = parser->GetParam(i);
|
wxString param = parser->GetParam(i);
|
||||||
sock->WriteMsg((const wxChar *) param, (param.Len() + 1) * sizeof(wxChar));
|
sock->WriteMsg((const wxChar *) param, (param.Len() + 1) * sizeof(wxChar));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Send an empty string to force existing Audacity to front
|
||||||
|
sock->WriteMsg(wxEmptyString, sizeof(wxChar));
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return sock->Error();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMilliSleep(100);
|
wxMilliSleep(100);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user