Ensure an intelligent default setting for mockingboard volume

This commit is contained in:
Aaron Culliney 2016-05-08 21:38:41 -07:00
parent 95e7964912
commit ac912ffd54

View File

@ -2373,8 +2373,8 @@ unsigned long MB_SetSnapshot(SS_CARD_MOCKINGBOARD* pSS, unsigned long dwSlot_unu
// ----------------------------------------------------------------------------
static void mb_prefsChanged(const char *domain) {
long goesToTen = 0;
prefs_parseLongValue(domain, PREF_MOCKINGBOARD_VOLUME, &goesToTen, /*base:*/10); // expected range 0-10
long lVal = 0;
long goesToTen = prefs_parseLongValue(domain, PREF_MOCKINGBOARD_VOLUME, &lVal, /*base:*/10) ? lVal : 5; // expected range 0-10
if (goesToTen < 0) {
goesToTen = 0;
}