forked from len0rd/rockbox
Add the ability to create a prefilled struct bitmap along with generated images.
This allows to directly draw generated and builtin images using lcd_bmp(bm_xxx); Also fixes builtin list icons on non-mono targets, as they didn't have the format field set. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30971 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
61f61c9773
commit
9a70c42241
7 changed files with 61 additions and 42 deletions
|
@ -184,6 +184,12 @@ static void usb_screen_fix_viewports(struct screen *screen,
|
|||
|
||||
static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
|
||||
{
|
||||
static const struct bitmap* logos[NB_SCREENS] = {
|
||||
&bm_usblogo,
|
||||
#ifdef HAVE_RE
|
||||
&bm_remote_usblogo,
|
||||
#endif
|
||||
};
|
||||
FOR_NB_SCREENS(i)
|
||||
{
|
||||
struct screen *screen = &screens[i];
|
||||
|
@ -200,17 +206,9 @@ static void usb_screens_draw(struct usb_screen_vps_t *usb_screen_vps_ar)
|
|||
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
screen->set_viewport(logo);
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
if (i == SCREEN_REMOTE)
|
||||
screen->bmp(logos[i], 0, 0);
|
||||
if (i == SCREEN_MAIN)
|
||||
{
|
||||
screen->bitmap(remote_usblogo, 0, 0, logo->width,
|
||||
logo->height);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
screen->transparent_bitmap(usblogo, 0, 0, logo->width,
|
||||
logo->height);
|
||||
#ifdef USB_ENABLE_HID
|
||||
if (usb_hid)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue