summaryrefslogtreecommitdiff
path: root/apps/recorder
diff options
context:
space:
mode:
Diffstat (limited to 'apps/recorder')
-rw-r--r--apps/recorder/backdrop.c45
-rw-r--r--apps/recorder/backdrop.h38
2 files changed, 83 insertions, 0 deletions
diff --git a/apps/recorder/backdrop.c b/apps/recorder/backdrop.c
new file mode 100644
index 0000000000..6fc5e24118
--- /dev/null
+++ b/apps/recorder/backdrop.c
@@ -0,0 +1,45 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Dave Chapman
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include <stdio.h>
21#include "config.h"
22#include "lcd.h"
23#include "backdrop.h"
24
25fb_data main_backdrop[LCD_HEIGHT][LCD_WIDTH];
26fb_data wps_backdrop[LCD_HEIGHT][LCD_WIDTH];
27
28bool load_main_backdrop(char* filename)
29{
30 struct bitmap bm;
31 int ret;
32
33 /* load the image */
34 bm.data=(char*)&main_backdrop[0][0];
35 ret = read_bmp_file(filename, &bm, sizeof(main_backdrop), FORMAT_NATIVE);
36
37 if ((ret > 0) && (bm.width == LCD_WIDTH)
38 && (bm.height == LCD_HEIGHT)) {
39 lcd_set_backdrop(&main_backdrop[0][0]);
40 return true;
41 } else {
42 lcd_set_backdrop(NULL);
43 return false;
44 }
45}
diff --git a/apps/recorder/backdrop.h b/apps/recorder/backdrop.h
new file mode 100644
index 0000000000..d77985cf28
--- /dev/null
+++ b/apps/recorder/backdrop.h
@@ -0,0 +1,38 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 Dave Chapman
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef _BACKDROP_H
21#define _BACKDROP_H
22
23#ifdef HAVE_LCD_COLOR
24
25#include "lcd.h"
26#include "bmp.h"
27#include "backdrop.h"
28
29#ifdef HAVE_LCD_COLOR
30extern fb_data main_backdrop[LCD_HEIGHT][LCD_WIDTH];
31extern fb_data wps_backdrop[LCD_HEIGHT][LCD_WIDTH];
32#endif
33
34bool load_main_backdrop(char* filename);
35
36#endif
37
38#endif