Add MIDI_GetDevice and use it so that the default driver value doesn't show as "Custom" in the menu

git-svn-id: https://svn.eduke32.com/eduke32@8261 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2019-10-24 05:47:29 +00:00 committed by Christoph Oelckers
parent 7650cbe592
commit c6c7c91d7c
6 changed files with 32 additions and 2 deletions

View file

@ -1197,7 +1197,16 @@ void MusicStartup(void)
buildprintf("Initializing MIDI driver... ");
int status;
if ((status = MUSIC_Init(MusicDevice)) != MUSIC_Ok && (status = MUSIC_Init(0)) != MUSIC_Ok && (status = MUSIC_Init(1)) != MUSIC_Ok)
if ((status = MUSIC_Init(MusicDevice)) == MUSIC_Ok)
{
if (MusicDevice == ASS_AutoDetect)
MusicDevice = MIDI_GetDevice();
}
else if ((status = MUSIC_Init(ASS_AutoDetect)) == MUSIC_Ok)
{
MusicDevice = MIDI_GetDevice();
}
else
{
buildprintf("Music error: %s\n", MUSIC_ErrorString(status));
mus_enabled = FALSE;