wrap around settings varied by hotkeys

This commit is contained in:
borti4938 2016-04-10 20:37:20 +02:00
parent 50badcce32
commit ff0c3494f3

View File

@ -897,13 +897,16 @@ void read_control()
} else if (remote_code == rc_keymap[RC_LCDBL]) { } else if (remote_code == rc_keymap[RC_LCDBL]) {
IOWR_ALTERA_AVALON_PIO_DATA(PIO_0_BASE, (IORD_ALTERA_AVALON_PIO_DATA(PIO_0_BASE) ^ (1<<1))); IOWR_ALTERA_AVALON_PIO_DATA(PIO_0_BASE, (IORD_ALTERA_AVALON_PIO_DATA(PIO_0_BASE) ^ (1<<1)));
} else if (remote_code == rc_keymap[RC_HOTKEY1]) { } else if (remote_code == rc_keymap[RC_HOTKEY1]) {
tc.sl_mode = (tc.sl_mode > 0) ? 0 : 1; //tc.sl_mode = (tc.sl_mode > 0) ? 0 : 1;
tc.sl_mode = tc.sl_mode < SL_MODE_MAX ? tc.sl_mode+1 : 0;
} else if (remote_code == rc_keymap[RC_HOTKEY2]) { } else if (remote_code == rc_keymap[RC_HOTKEY2]) {
if (tc.sl_str > 0) //if (tc.sl_str > 0)
tc.sl_str--; // tc.sl_str--;
tc.sl_str = tc.sl_str ? tc.sl_str-1 : SCANLINESTR_MAX;
} else if (remote_code == rc_keymap[RC_HOTKEY3]) { } else if (remote_code == rc_keymap[RC_HOTKEY3]) {
if (tc.sl_str < SCANLINESTR_MAX) //if (tc.sl_str < SCANLINESTR_MAX)
tc.sl_str++; // tc.sl_str++;
tc.sl_str = tc.sl_str < SCANLINESTR_MAX ? tc.sl_str+1 : 0;
} }
} }