PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)

Revision:
53:ee5e28819ebb
Parent:
52:c04087025cab
Child:
54:7082c373d764
--- a/POKITTO_CORE/PokittoCore.cpp	Sun Jul 01 06:32:37 2018 +0000
+++ b/POKITTO_CORE/PokittoCore.cpp	Sat Jul 21 11:39:21 2018 +0000
@@ -473,6 +473,7 @@
     float vol = sound.getVolume(); float tvol;
     #ifndef POK_SIM
     vol=eeprom_read_byte((uint16_t*)EESETTINGS_VOL);
+    if (vol<0) vol=0;
     Pokitto::Sound::globalVolume=vol;
     #endif
     if (vol>VOLUME_HEADPHONE_MAX) sound.setMaxVol(VOLUME_SPEAKER_MAX);
@@ -490,7 +491,7 @@
     //read countdown time from settings
     countd = eeprom_read_byte((uint16_t*)EESETTINGS_VOLWAIT);
     #endif
-    if (countd==0 || countd > 10) countd=0xFFFF;
+    if (countd<=0 || countd > 10) countd=0xFFFF;
     #ifdef PRODUCTIONTESTING
     countd=2;
     #endif