strymon / spl

A tool for managing MIDI presets written in C++ using Qt and RtMIDI
49 stars 11 forks source link

Corrected issue when MIDI adapter name contained more occurrences of IDX #9

Closed stanciuadrian closed 8 years ago

stanciuadrian commented 8 years ago

The first (idx=0) MIDI-in adapter on my PC is EMU 0404 | USB and MiniInWinMM::getPortName returns it as EMU 0404 | USB<space>0.

The original code uses QString::remove which removes all the occurrences of 0 from the adapter name. The result is EMU 44 | USB and its mismatch with the real adapter name causes the firmware update to fail.

The proposed change removes the final idx only if the adapter name given by RtMidi ends with it. It's a little bit better but just enough to perform the firmware update.

luntar commented 8 years ago

Thanks for taking the time to debug this issue and I really appreciate the pull requests!

stanciuadrian commented 8 years ago

You're welcome! Thank you for open-sourcing the tool.