A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 65 lines 2.2 kB view raw
1/*************************************************************************** 2 * __________ __ ___. 3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 * \/ \/ \/ \/ \/ 8 * $Id$ 9 * 10 * Copyright (C) 2008 by Barry Wardell 11 * 12 * This program is free software; you can redistribute it and/or 13 * modify it under the terms of the GNU General Public License 14 * as published by the Free Software Foundation; either version 2 15 * of the License, or (at your option) any later version. 16 * 17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 * KIND, either express or implied. 19 * 20 ****************************************************************************/ 21#include "lcd.h" 22#include "lcd-remote.h" 23#include "font.h" 24#include <stdio.h> 25#include <string.h> 26#include "version.h" 27 28#ifndef DISABLE_LOGO 29#include "bitmaps/rockboxlogo.h" 30#endif 31#if LCD_WIDTH <= 128 32#define BOOT_VERFMT "Boot %s" 33#else 34#define BOOT_VERFMT "Boot Ver. %s" 35#endif 36 37/* Ensure TEXT_XPOS is >= 0 */ 38#define TEXT_WIDTH(l) ((l)*SYSFONT_WIDTH) 39#define TEXT_XPOS(w) (((w) > LCD_WIDTH) ? 0 : ((LCD_WIDTH - (w)) / 2)) 40#define LOGO_XPOS ((LCD_WIDTH - BMPWIDTH_rockboxlogo) / 2) 41 42void show_logo( void ) 43{ 44 lcd_clear_display(); 45 lcd_setfont(FONT_SYSFIXED); 46 47 char verstr[strlen(rbversion) + sizeof (BOOT_VERFMT)]; 48 int len = snprintf(verstr, sizeof(verstr), BOOT_VERFMT, rbversion); 49 int text_width = TEXT_WIDTH(len); 50 int text_xpos = TEXT_XPOS(text_width); 51 52#if defined(SANSA_CLIP) || defined(SANSA_CLIPV2) || defined(SANSA_CLIPPLUS) 53 /* The top 16 lines of the Sansa Clip screen are yellow, and the bottom 48 54 are blue, so we reverse the usual positioning */ 55 lcd_putsxy(text_xpos, 0, verstr); 56 lcd_bmp(&bm_rockboxlogo, LOGO_XPOS, 16); 57#else 58#ifndef DISABLE_LOGO 59 lcd_bmp(&bm_rockboxlogo, LOGO_XPOS, 10); 60#endif 61 lcd_putsxy(text_xpos, LCD_HEIGHT-SYSFONT_HEIGHT, verstr); 62#endif 63 64 lcd_update(); 65}