- fixed inverted error checking logic for loading a patch set in the WildMidi player.

This commit is contained in:
Christoph Oelckers 2021-12-29 19:07:32 +01:00
parent 8375c06737
commit 6b5aebf6a3

View file

@ -87,10 +87,10 @@ void WildMIDIDevice::LoadInstruments()
{
wildMidiConfig.loadedConfig = wildMidiConfig.readerName;
wildMidiConfig.instruments.reset(new WildMidi::Instruments(wildMidiConfig.reader, SampleRate));
bool success = wildMidiConfig.instruments->LoadConfig(wildMidiConfig.readerName.c_str());
int error = wildMidiConfig.instruments->LoadConfig(wildMidiConfig.readerName.c_str());
wildMidiConfig.reader = nullptr;
if (!success)
if (error)
{
wildMidiConfig.instruments.reset();
wildMidiConfig.loadedConfig = "";