Fixed 'command leakage' when playback was aborted which caused the menu to go up a dir.

Some minor cleanup of tabs and indentation
This commit is contained in:
sweetlilmre
2015-02-14 13:08:34 +02:00
parent 71555735c1
commit 2bd53473bb
3 changed files with 10 additions and 5 deletions
+4 -3
View File
@@ -92,10 +92,11 @@ void input_callback()
static unsigned char ct0, ct1, rpt;
unsigned char i;
#ifdef KEYS_INPUT_PULLUP // key changed ?
i = key_state ^ ~KEYS_READ_PINS; // for internal pullup the reading is inverted
// key changed ?
#ifdef KEYS_INPUT_PULLUP
i = key_state ^ ~KEYS_READ_PINS; // HW V2.0 for internal pullup the reading is inverted
#else
i = key_state ^ KEYS_READ_PINS;
i = key_state ^ KEYS_READ_PINS; // HW V1.0 normal read
#endif
ct0 = ~( ct0 & i ); // reset or count ct0
+2 -1
View File
@@ -60,7 +60,8 @@
#define CONTROL_SET_BUS0() CONTROL_PORT &= ~(_BV(CONTROL_PIN0) | _BV(CONTROL_PIN1))
#define CONTROL_SET_BUS1() { CONTROL_PORT &= ~_BV(CONTROL_PIN1); CONTROL_PORT |= _BV(CONTROL_PIN0); }
//#define KEYS_INPUT_PULLUP // uncomment this line if you are using HW2.0
// uncomment this line if you are using HW2.0
//#define KEYS_INPUT_PULLUP
#define KEYS_READ_PORT PORTC
#define KEYS_READ_DDR DDRC
#define KEYS_READ_PINS PINC
+4 -1
View File
@@ -320,7 +320,10 @@ int play_file(FILINFO* pfile_info)
// end of load UI indicator
lcd_busy_spinner();
// prevent leakage of g_cur_command, the standard mechanism is to use get_cur_command() which would clear the global
g_cur_command = COMMAND_IDLE;
return 1;
}