Wrong ALSA MIDI setup after startup
On Linux, the preferences dialog always shows 0 MIDI devices after startup, even though the MIDI config is properly recorded in the user-settings file and the right number of ALSA sequencer ports is created at startup. The proper number of ALSA sequencer ports is only shown after switching the MIDI API.
This is obviously due to the fact that s_midi_alsa.c keeps track of the number of MIDI ports in two different sets of state variables. The secondary one, being used by the GUI via midi_alsa_getdevs, isn't properly initialized (it's only updated via midi_alsa_setndevs after switching MIDI APIs, but not when the MIDI devices are first opened).