From 93b899d0fe3426ed50de06d20cdefb6d288e5ec2 Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Sun, 21 May 2006 11:00:02 +0000 Subject: Reworked backdrop handling. Fixes a bug that wasn't in the tracker yet ;) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9970 a1c6a512-1295-4272-9138-f99709370657 --- apps/onplay.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'apps/onplay.c') diff --git a/apps/onplay.c b/apps/onplay.c index 6ff99d7dd1..bc486d1a38 100644 --- a/apps/onplay.c +++ b/apps/onplay.c @@ -433,22 +433,13 @@ static bool delete_dir(void) #ifdef HAVE_LCD_COLOR static bool set_backdrop(void) { - struct bitmap bm; - int ret; - /* load the image */ - bm.data=(char*)&main_backdrop[0][0]; - ret = read_bmp_file(selected_file, &bm, - sizeof(main_backdrop), FORMAT_NATIVE); - - if ((ret > 0) && (bm.width == LCD_WIDTH) - && (bm.height == LCD_HEIGHT)) { - lcd_set_backdrop(&main_backdrop[0][0]); + if(load_main_backdrop(selected_file)) { gui_syncsplash(HZ, true, str(LANG_BACKDROP_LOADED)); set_file(selected_file, (char *)global_settings.backdrop_file, MAX_FILENAME); + show_main_backdrop(); return true; } else { - lcd_set_backdrop(NULL); gui_syncsplash(HZ, true, str(LANG_BACKDROP_FAILED)); return false; } -- cgit v1.2.3