aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpmainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpmainwindow.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp
index 76cd221..0bcf070 100644
--- a/qmidiplayer-desktop/qmpmainwindow.cpp
+++ b/qmidiplayer-desktop/qmpmainwindow.cpp
@@ -52,9 +52,8 @@ qmpMainWindow::~qmpMainWindow()
delete a[i];
}
pmgr->deinitPlugins();
- std::vector<std::pair<qmpMidiOutRtMidi*,std::string>> rtdev=rtmididev->getDevices();
+ auto rtdev=qmpRtMidiManager::getDevices();
for(auto &i:rtdev)player->unregisterMidiOutDevice(i.second);
- rtmididev->deleteDevices();
delete pmgr;
if(timer)delete timer;
delete helpw;helpw=nullptr;
@@ -83,9 +82,7 @@ void qmpMainWindow::init()
[this]
{
player=new CMidiPlayer();
- rtmididev=new qmpRtMidiManager();
- rtmididev->createDevices();
- std::vector<std::pair<qmpMidiOutRtMidi*,std::string>> rtdev=rtmididev->getDevices();
+ auto rtdev=qmpRtMidiManager::getDevices();
for(auto &i:rtdev)
{
player->registerMidiOutDevice(i.first,i.second);
@@ -133,7 +130,7 @@ void qmpMainWindow::init()
ui->pbSettings->setIcon(QIcon(getThemedIcon(":/img/settings.svg")));
ui->pbAdd->setIcon(QIcon(getThemedIcon(":/img/open.svg")));
if(argfiles.size())on_pbPlayPause_clicked();
- setupWidget();settingsw->verifySF();
+ setupWidget();settingsw->postInit();
}
int qmpMainWindow::parseArgs()