1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-14 15:20:29 +02:00

Switch to calling Yield via wxTheApp instead of wxGetApp(). Simpler to use pointer, AudacityApp doesn't override Yield, and this fixes compile error on VC++ Unicode Release.

This commit is contained in:
v.audacity 2010-07-24 23:21:51 +00:00
parent 4ae0fa3238
commit 8c51e56248
5 changed files with 9 additions and 9 deletions

View File

@ -66,7 +66,7 @@ void NonGuiThread::RunInThread(tGenericFn pFn)
{
wxMilliSleep( 100 );
//traits->AlwaysYield();
wxGetApp().Yield();
wxTheApp->Yield();
}
#ifdef WXMSW
traits->AfterChildWaitLoop(cookie);

View File

@ -377,7 +377,7 @@ AudioIO::~AudioIO()
/* Delete is a "graceful" way to stop the thread.
(Kill is the not-graceful way.) */
wxGetApp().Yield();
wxTheApp->Yield();
mThread->Delete();
if(mSilentBuf)

View File

@ -367,7 +367,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent &event )
Printf(wxT("Preparing...\n"));
wxGetApp().Yield();
wxTheApp->Yield();
FlushPrint();
int i, b, v;
@ -400,7 +400,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent &event )
//t->Debug();
Printf(wxT("Performing %d edits...\n"), trials);
wxGetApp().Yield();
wxTheApp->Yield();
FlushPrint();
timer.Start();
@ -454,7 +454,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent &event )
}
Printf(wxT("Time to perform %d edits: %ld ms\n"), trials, elapsed);
FlushPrint();
wxGetApp().Yield();
wxTheApp->Yield();
#if 0
@ -466,7 +466,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent &event )
Printf(wxT("Doing correctness check...\n"));
FlushPrint();
wxGetApp().Yield();
wxTheApp->Yield();
bad = 0;
timer.Start();
@ -491,7 +491,7 @@ void BenchmarkDialog::OnRun( wxCommandEvent &event )
Printf(wxT("Time to check all data: %ld ms\n"), elapsed);
Printf(wxT("Reading data again...\n"));
wxGetApp().Yield();
wxTheApp->Yield();
FlushPrint();
timer.Start();

View File

@ -68,7 +68,7 @@ static void main_do_event(GdkEvent *event, wxArrayPtrVoid *queue)
CaptureEvents::CaptureEvents()
{
#if wxUSE_LOG
// disable log flushing from here because a call to wxGetApp().Yield() shouldn't
// disable log flushing from here because a call to wxTheApp->Yield() shouldn't
// normally result in message boxes popping up &c
wxLog::Suspend();
#endif

View File

@ -413,7 +413,7 @@ int ExportCL::Export(AudacityProject *project,
// Wait for process to terminate
while (p->IsActive()) {
wxMilliSleep(10);
wxGetApp().Yield();
wxTheApp->Yield();
}
// Display output on error or if the user wants to see it