- prevent message spam with no MIDI devices.

This commit is contained in:
Christoph Oelckers 2016-05-18 13:11:01 +02:00
parent 7642c2cdaa
commit 9e0301c1a1

View file

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