Revert "fix(hotkeys): initialize libremidi in try catch block (#505)"

This reverts commit fa8fac1fed0b17a1b2194a26500e3ef740c839ca.
This commit is contained in:
D3SOX 2022-05-27 18:45:07 +02:00
parent 611ebcc216
commit 885230b7bc
No known key found for this signature in database
GPG Key ID: 39EC1673FC37B048
2 changed files with 4 additions and 6 deletions

View File

@ -39,10 +39,8 @@ namespace Soundux
{
try
{
midi = std::make_unique<libremidi::midi_in>();
midi->open_port();
midi->set_callback([this](const libremidi::message &message) {
midi.open_port();
midi.set_callback([this](const libremidi::message &message) {
if (message.size() < 3)
{
Fancy::fancy.logTime().failure()
@ -95,7 +93,7 @@ namespace Soundux
}
}
});
midi->ignore_types(false, false, false);
midi.ignore_types(false, false, false);
}
catch (const libremidi::midi_exception &e)
{

View File

@ -18,7 +18,7 @@ namespace Soundux
{
class Hotkeys
{
std::unique_ptr<libremidi::midi_in> midi;
libremidi::midi_in midi;
protected:
Hotkeys() = default;