1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2006 Dave Chapman
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
25 #ifdef HAVE_REMOTE_LCD
26 #include "lcd-remote.h"
30 bool backdrop_load(const char* filename
, char *backdrop_buffer
)
36 bm
.data
= backdrop_buffer
;
37 ret
= read_bmp_file(filename
, &bm
, LCD_BACKDROP_BYTES
,
38 FORMAT_NATIVE
| FORMAT_DITHER
, NULL
);
41 && (bm
.width
== LCD_WIDTH
) && (bm
.height
== LCD_HEIGHT
));
45 void backdrop_show(char *backdrop_buffer
)
47 lcd_set_backdrop((fb_data
*)backdrop_buffer
);
51 #if defined(HAVE_REMOTE_LCD)
53 #if LCD_REMOTE_DEPTH > 1
55 bool remote_backdrop_load(const char *filename
, char* backdrop_buffer
)
61 bm
.data
= backdrop_buffer
;
62 ret
= read_bmp_file(filename
, &bm
, REMOTE_LCD_BACKDROP_BYTES
,
63 FORMAT_NATIVE
| FORMAT_DITHER
| FORMAT_REMOTE
, NULL
);
65 && (bm
.width
== LCD_REMOTE_WIDTH
) && (bm
.height
== LCD_REMOTE_HEIGHT
));
68 void remote_backdrop_show(char *backdrop_buffer
)
70 lcd_remote_set_backdrop((fb_remote_data
*)backdrop_buffer
);
73 #else /* needs stubs */
75 bool remote_backdrop_load(const char *filename
, char* backdrop_buffer
)
77 (void)filename
; (void) backdrop_buffer
;
80 void remote_backdrop_show(char* backdrop_buffer
)
82 (void)backdrop_buffer
;