diff --git a/src/sound/music_midi_base.cpp b/src/sound/music_midi_base.cpp index a08625292f..8c44a2ac43 100644 --- a/src/sound/music_midi_base.cpp +++ b/src/sound/music_midi_base.cpp @@ -74,8 +74,12 @@ CUSTOM_CVAR (Int, snd_mididevice, -1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) if ((self >= (signed)nummididevices) || (self < -6)) { - Printf ("ID out of range. Using default device.\n"); - self = 0; + // Don't do repeated message spam if there is no valid device. + if (self != 0) + { + Printf("ID out of range. Using default device.\n"); + self = 0; + } return; } mididevice = MAX(0, self);