Revert "fix(hotkeys): initialize libremidi in try catch block (#505)"
This reverts commit fa8fac1fed0b17a1b2194a26500e3ef740c839ca.
This commit is contained in:
parent
611ebcc216
commit
885230b7bc
@ -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)
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ namespace Soundux
|
||||
{
|
||||
class Hotkeys
|
||||
{
|
||||
std::unique_ptr<libremidi::midi_in> midi;
|
||||
libremidi::midi_in midi;
|
||||
|
||||
protected:
|
||||
Hotkeys() = default;
|
||||
|
Loading…
x
Reference in New Issue
Block a user