mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
center logo horizontaly in bootloader version of show_logo()
Change-Id: I537466825de7f3bc8d55d9519cd27f562fbb344f
This commit is contained in:
parent
e1796fbc20
commit
69978d7046
1 changed files with 3 additions and 2 deletions
|
@ -36,6 +36,7 @@
|
||||||
/* Ensure TEXT_XPOS is >= 0 */
|
/* Ensure TEXT_XPOS is >= 0 */
|
||||||
#define TEXT_WIDTH ((sizeof(BOOT_VERSION)-1)*SYSFONT_WIDTH)
|
#define TEXT_WIDTH ((sizeof(BOOT_VERSION)-1)*SYSFONT_WIDTH)
|
||||||
#define TEXT_XPOS ((TEXT_WIDTH > LCD_WIDTH) ? 0 : ((LCD_WIDTH - TEXT_WIDTH) / 2))
|
#define TEXT_XPOS ((TEXT_WIDTH > LCD_WIDTH) ? 0 : ((LCD_WIDTH - TEXT_WIDTH) / 2))
|
||||||
|
#define LOGO_XPOS ((LCD_WIDTH - BMPWIDTH_rockboxlogo) / 2)
|
||||||
|
|
||||||
void show_logo( void )
|
void show_logo( void )
|
||||||
{
|
{
|
||||||
|
@ -46,9 +47,9 @@ void show_logo( void )
|
||||||
/* The top 16 lines of the Sansa Clip screen are yellow, and the bottom 48
|
/* The top 16 lines of the Sansa Clip screen are yellow, and the bottom 48
|
||||||
are blue, so we reverse the usual positioning */
|
are blue, so we reverse the usual positioning */
|
||||||
lcd_putsxy(TEXT_XPOS, 0, BOOT_VERSION);
|
lcd_putsxy(TEXT_XPOS, 0, BOOT_VERSION);
|
||||||
lcd_bmp(&bm_rockboxlogo, 0, 16);
|
lcd_bmp(&bm_rockboxlogo, LOGO_XPOS, 16);
|
||||||
#else
|
#else
|
||||||
lcd_bmp(&bm_rockboxlogo, 0, 10);
|
lcd_bmp(&bm_rockboxlogo, LOGO_XPOS, 10);
|
||||||
lcd_putsxy(TEXT_XPOS, LCD_HEIGHT-SYSFONT_HEIGHT, BOOT_VERSION);
|
lcd_putsxy(TEXT_XPOS, LCD_HEIGHT-SYSFONT_HEIGHT, BOOT_VERSION);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue