summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2017-09-10 21:55:35 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2017-09-17 00:03:02 +0200
commitac57f96838b53e574477d13bf41bc54711a70c21 (patch)
treedcd4c1d96593458c59375c2160c3ffaeb27329e5 /bootloader
parentf22ccabac339925dbb004bd035307480fca9d2f7 (diff)
downloadrockbox-ac57f96838b53e574477d13bf41bc54711a70c21.tar.gz
rockbox-ac57f96838b53e574477d13bf41bc54711a70c21.tar.bz2
rockbox-ac57f96838b53e574477d13bf41bc54711a70c21.zip
Add support for the NWZ-A860
Change-Id: Ibf0c5168ac31d4ba2aeaa86cbeca37a1011b75fa
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/nwz_linux.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/bootloader/nwz_linux.c b/bootloader/nwz_linux.c
index 7fe635bf76..cac9909d2d 100644
--- a/bootloader/nwz_linux.c
+++ b/bootloader/nwz_linux.c
@@ -63,6 +63,15 @@
#error toolsicon has the wrong resolution
#endif
+/* the A860 does not have left/right/up/down but it has rew/ff so pretend we
+ * always have rew/ff */
+#ifndef BUTTON_REW
+#define BUTTON_REW BUTTON_LEFT
+#endif
+#ifndef BUTTON_FF
+#define BUTTON_FF BUTTON_RIGHT
+#endif
+
/* buffer for Sony image, filled from NVP */
unsigned short sonyicon[ICON_WIDTH * ICON_HEIGHT];
const struct bitmap bm_sonyicon =
@@ -257,9 +266,9 @@ enum boot_mode get_boot_mode(void)
if(btn == BUTTON_PLAY)
break;
/* left/right/up/down: change mode */
- if(btn == BUTTON_LEFT || btn == BUTTON_DOWN)
+ if(btn == BUTTON_LEFT || btn == BUTTON_DOWN || btn == BUTTON_REW)
mode = (mode + BOOT_COUNT - 1) % BOOT_COUNT;
- if(btn == BUTTON_RIGHT || btn == BUTTON_UP)
+ if(btn == BUTTON_RIGHT || btn == BUTTON_UP || btn == BUTTON_FF)
mode = (mode + 1) % BOOT_COUNT;
}
@@ -340,9 +349,9 @@ int choice_screen(const char *title, bool center, int nr_choices, const char *ch
return btn == BUTTON_PLAY ? choice : -1;
}
/* left/right/up/down: change mode */
- if(btn == BUTTON_LEFT || btn == BUTTON_UP)
+ if(btn == BUTTON_LEFT || btn == BUTTON_UP || btn == BUTTON_REW)
choice = (choice + nr_choices - 1) % nr_choices;
- if(btn == BUTTON_RIGHT || btn == BUTTON_DOWN)
+ if(btn == BUTTON_RIGHT || btn == BUTTON_DOWN || btn == BUTTON_FF)
choice = (choice + 1) % nr_choices;
}
}