Move deviceSelector init startup -> appframe

- Plus some minor static analysis fixes and missing atomic store() for
MSVC
This commit is contained in:
Charles J. Cliffe 2015-10-05 19:59:17 -04:00
parent 0df2439658
commit dff879f233
3 changed files with 6 additions and 8 deletions

View File

@ -291,8 +291,8 @@ AppFrame::AppFrame() :
menuBar->Append(menu, wxT("&Input Bandwidth"));
std::vector<SDRDeviceInfo *> *devs = wxGetApp().getDevices();
std::vector<SDRDeviceInfo *>::iterator devs_i;
// std::vector<SDRDeviceInfo *> *devs = wxGetApp().getDevices();
// std::vector<SDRDeviceInfo *>::iterator devs_i;
// if (devs->size() > 1) {
//
@ -346,7 +346,6 @@ AppFrame::AppFrame() :
}
for (mdevices_i = outputDevices.begin(); mdevices_i != outputDevices.end(); mdevices_i++) {
new wxMenu;
int menu_id = wxID_AUDIO_BANDWIDTH_BASE + wxID_AUDIO_DEVICE_MULTIPLIER * mdevices_i->first;
wxMenu *subMenu = new wxMenu;
menu->AppendSubMenu(subMenu, mdevices_i->second.name, wxT("Description?"));
@ -417,6 +416,8 @@ AppFrame::AppFrame() :
wxAcceleratorTable accel(3, entries);
SetAcceleratorTable(accel);
wxGetApp().deviceSelector();
// static const int attribs[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, 0 };
// wxLogStatus("Double-buffered display %s supported", wxGLCanvas::IsDisplaySupported(attribs) ? "is" : "not");
// ShowFullScreen(true);

View File

@ -102,9 +102,6 @@ bool CubicSDR::OnInit() {
sdrEnum = new SDREnumerator();
appframe = new AppFrame();
deviceSelectorOpen.store(true);
deviceSelectorDialog = new SDRDevicesDialog(appframe);
deviceSelectorDialog->Show();
t_SDREnum = new std::thread(&SDREnumerator::threadMain, sdrEnum);
@ -199,7 +196,7 @@ void CubicSDR::deviceSelector() {
deviceSelectorDialog->SetFocus();
return;
}
deviceSelectorOpen = true;
deviceSelectorOpen.store(true);
deviceSelectorDialog = new SDRDevicesDialog(appframe);
deviceSelectorDialog->Show();
}

View File

@ -20,7 +20,7 @@ AudioThread::AudioThread() : IOThread(),
outputDevice.store(-1);
gain.store(1.0);
boundThreads = new std::vector<AudioThread *>;
boundThreads.store(new std::vector<AudioThread *>);
}
AudioThread::~AudioThread() {