summaryrefslogtreecommitdiff
path: root/bootloader/rocker_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader/rocker_linux.c')
-rw-r--r--bootloader/rocker_linux.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/bootloader/rocker_linux.c b/bootloader/rocker_linux.c
index e3985ce100..4abc88c413 100644
--- a/bootloader/rocker_linux.c
+++ b/bootloader/rocker_linux.c
@@ -51,23 +51,42 @@
51#define ICON_WIDTH 70 51#define ICON_WIDTH 70
52#define ICON_HEIGHT 70 52#define ICON_HEIGHT 70
53#define RBFILE "rockbox.rocker" 53#define RBFILE "rockbox.rocker"
54#define ICON_NAME bm_hibyicon
55#define OF_NAME "HIBY PLAYER"
56#include "bitmaps/hibyicon.h"
54#elif defined(XDUOO_X3II) 57#elif defined(XDUOO_X3II)
55#define ICON_WIDTH 130 58#define ICON_WIDTH 130
56#define ICON_HEIGHT 130 59#define ICON_HEIGHT 130
57#define RBFILE "rockbox.x3ii" 60#define RBFILE "rockbox.x3ii"
61#define ICON_NAME bm_hibyicon
62#define OF_NAME "HIBY PLAYER"
63#include "bitmaps/hibyicon.h"
58#elif defined(XDUOO_X20) 64#elif defined(XDUOO_X20)
59#define ICON_WIDTH 130 65#define ICON_WIDTH 130
60#define ICON_HEIGHT 130 66#define ICON_HEIGHT 130
61#define RBFILE "rockbox.x20" 67#define RBFILE "rockbox.x20"
68#define ICON_NAME bm_hibyicon
69#define OF_NAME "HIBY PLAYER"
70#include "bitmaps/hibyicon.h"
71#elif defined(FIIO_M3K)
72#define ICON_WIDTH 130
73#define ICON_HEIGHT 130
74#define RBFILE "rockbox.fiiom3k"
75#define ICON_NAME bm_fiioicon
76#define OF_NAME "FIIO PLAYER"
77#include "bitmaps/fiioicon.h"
62#else 78#else
63#error "must define ICON_WIDTH/HEIGHT" 79#error "must define ICON_WIDTH/HEIGHT"
64#endif 80#endif
65 81
82#ifdef FIIO_M3K
83#define BASE_DIR "/mnt"
84#else
66#define BASE_DIR "/mnt/sd_0" 85#define BASE_DIR "/mnt/sd_0"
86#endif
67 87
68/* images */ 88/* images */
69#include "bitmaps/rockboxicon.h" 89#include "bitmaps/rockboxicon.h"
70#include "bitmaps/hibyicon.h"
71#include "bitmaps/toolsicon.h" 90#include "bitmaps/toolsicon.h"
72 91
73/* don't issue an error when parsing the file for dependencies */ 92/* don't issue an error when parsing the file for dependencies */
@@ -79,6 +98,10 @@
79 BMPHEIGHT_hibyicon != ICON_HEIGHT) 98 BMPHEIGHT_hibyicon != ICON_HEIGHT)
80#error hibyicon has the wrong resolution 99#error hibyicon has the wrong resolution
81#endif 100#endif
101#if defined(BMPWIDTH_fiioicon) && (BMPWIDTH_fiioicon != ICON_WIDTH || \
102 BMPHEIGHT_fiioicon != ICON_HEIGHT)
103#error fiioicon has the wrong resolution
104#endif
82#if defined(BMPWIDTH_toolsicon) && (BMPWIDTH_toolsicon != ICON_WIDTH || \ 105#if defined(BMPWIDTH_toolsicon) && (BMPWIDTH_toolsicon != ICON_WIDTH || \
83 BMPHEIGHT_toolsicon != ICON_HEIGHT) 106 BMPHEIGHT_toolsicon != ICON_HEIGHT)
84#error toolsicon has the wrong resolution 107#error toolsicon has the wrong resolution
@@ -148,6 +171,8 @@ static int get_inactivity_tmo(void)
148 else 171 else
149#endif 172#endif
150 return 10 * HZ; /* Inactivity timeout when not on hold */ 173 return 10 * HZ; /* Inactivity timeout when not on hold */
174
175 // XXX if booting the last selection, use a short timeout?
151} 176}
152 177
153/* return action on idle timeout */ 178/* return action on idle timeout */
@@ -229,11 +254,11 @@ static enum boot_mode get_boot_mode(void)
229 } 254 }
230 lcd_set_foreground(LCD_RGBPACK(255, 201, 0)); 255 lcd_set_foreground(LCD_RGBPACK(255, 201, 0));
231 /* display icon */ 256 /* display icon */
232 const struct bitmap *icon = (mode == BOOT_OF) ? &bm_hibyicon : 257 const struct bitmap *icon = (mode == BOOT_OF) ? &ICON_NAME :
233 (mode == BOOT_ROCKBOX) ? &bm_rockboxicon : &bm_toolsicon; 258 (mode == BOOT_ROCKBOX) ? &bm_rockboxicon : &bm_toolsicon;
234 lcd_bmp(icon, (LCD_WIDTH - ICON_WIDTH) / 2, get_icon_y()); 259 lcd_bmp(icon, (LCD_WIDTH - ICON_WIDTH) / 2, get_icon_y());
235 /* display bottom description */ 260 /* display bottom description */
236 const char *desc = (mode == BOOT_OF) ? "HIBY PLAYER" : 261 const char *desc = (mode == BOOT_OF) ? OF_NAME :
237 (mode == BOOT_ROCKBOX) ? "ROCKBOX" : "TOOLS"; 262 (mode == BOOT_ROCKBOX) ? "ROCKBOX" : "TOOLS";
238 263
239 int desc_height; 264 int desc_height;