summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-05-18 12:27:20 +0000
committerThomas Martitz <kugel@rockbox.org>2010-05-18 12:27:20 +0000
commit6cbc701d2a9890baa49f69f1692dddebf39e30cb (patch)
tree08f098ca1eb9ab308242e3e4dc1584691152ea1b /firmware
parentd3735578c3d957e7bb68e2838024ab57bceade68 (diff)
downloadrockbox-6cbc701d2a9890baa49f69f1692dddebf39e30cb.tar.gz
rockbox-6cbc701d2a9890baa49f69f1692dddebf39e30cb.zip
Rename sdl lcd initialization to (remote_)lcd_init_device which enables removing two #ifdef SIMULATOR and makes it happen as on target.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26137 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/lcd-1bit-vert.c2
-rw-r--r--firmware/drivers/lcd-2bit-vi.c2
-rw-r--r--firmware/target/hosted/sdl/lcd-bitmap.c2
-rw-r--r--firmware/target/hosted/sdl/lcd-charcells.c2
-rw-r--r--firmware/target/hosted/sdl/lcd-remote-bitmap.c4
-rw-r--r--firmware/target/hosted/sdl/system-sdl.c6
-rw-r--r--firmware/target/hosted/sdl/system-sdl.h1
7 files changed, 6 insertions, 13 deletions
diff --git a/firmware/drivers/lcd-1bit-vert.c b/firmware/drivers/lcd-1bit-vert.c
index fcf5dfcc47..fd77ba7578 100644
--- a/firmware/drivers/lcd-1bit-vert.c
+++ b/firmware/drivers/lcd-1bit-vert.c
@@ -105,9 +105,7 @@ void LCDFN(update_viewport_rect)(int x, int y, int width, int height)
void LCDFN(init)(void)
{
LCDFN(clear_display)();
-#ifndef SIMULATOR
LCDFN(init_device)();
-#endif
#ifdef MAIN_LCD
scroll_init();
#endif
diff --git a/firmware/drivers/lcd-2bit-vi.c b/firmware/drivers/lcd-2bit-vi.c
index 803a3678d0..5dd94a15a0 100644
--- a/firmware/drivers/lcd-2bit-vi.c
+++ b/firmware/drivers/lcd-2bit-vi.c
@@ -122,9 +122,7 @@ void LCDFN(init)(void)
{
LCDFN(set_viewport)(NULL);
LCDFN(clear_display)();
-#ifndef SIMULATOR
LCDFN(init_device)();
-#endif
#ifdef MAIN_LCD
scroll_init();
#endif
diff --git a/firmware/target/hosted/sdl/lcd-bitmap.c b/firmware/target/hosted/sdl/lcd-bitmap.c
index 6dfbffff37..7058b26e8c 100644
--- a/firmware/target/hosted/sdl/lcd-bitmap.c
+++ b/firmware/target/hosted/sdl/lcd-bitmap.c
@@ -160,7 +160,7 @@ void sim_backlight(int value)
#endif /* HAVE_BACKLIGHT */
/* initialise simulator lcd driver */
-void sim_lcd_init(void)
+void lcd_init_device(void)
{
#if LCD_DEPTH == 16
lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
diff --git a/firmware/target/hosted/sdl/lcd-charcells.c b/firmware/target/hosted/sdl/lcd-charcells.c
index 900cbb04dd..9ceb5de391 100644
--- a/firmware/target/hosted/sdl/lcd-charcells.c
+++ b/firmware/target/hosted/sdl/lcd-charcells.c
@@ -106,7 +106,7 @@ void sim_backlight(int value)
#endif
/* initialise simulator lcd driver */
-void sim_lcd_init(void)
+void lcd_init_device(void)
{
lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
SIM_LCD_WIDTH * display_zoom,
diff --git a/firmware/target/hosted/sdl/lcd-remote-bitmap.c b/firmware/target/hosted/sdl/lcd-remote-bitmap.c
index 9972f3e423..86d45ef446 100644
--- a/firmware/target/hosted/sdl/lcd-remote-bitmap.c
+++ b/firmware/target/hosted/sdl/lcd-remote-bitmap.c
@@ -98,8 +98,10 @@ void sim_remote_backlight(int value)
}
/* initialise simulator lcd remote driver */
-void sim_lcd_remote_init(void)
+void lcd_remote_init_device(void)
{
+ if (!showremote)
+ return;
remote_surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
LCD_REMOTE_WIDTH * display_zoom,
LCD_REMOTE_HEIGHT * display_zoom,
diff --git a/firmware/target/hosted/sdl/system-sdl.c b/firmware/target/hosted/sdl/system-sdl.c
index 9d529de37f..7ab6fd2c34 100644
--- a/firmware/target/hosted/sdl/system-sdl.c
+++ b/firmware/target/hosted/sdl/system-sdl.c
@@ -140,12 +140,6 @@ static int sdl_event_thread(void * param)
SDL_WM_SetCaption(UI_TITLE, NULL);
- sim_lcd_init();
-#ifdef HAVE_REMOTE_LCD
- if (showremote)
- sim_lcd_remote_init();
-#endif
-
if (background && picture_surface != NULL)
SDL_BlitSurface(picture_surface, NULL, gui_surface, NULL);
diff --git a/firmware/target/hosted/sdl/system-sdl.h b/firmware/target/hosted/sdl/system-sdl.h
index ad7aa709ab..e87f096617 100644
--- a/firmware/target/hosted/sdl/system-sdl.h
+++ b/firmware/target/hosted/sdl/system-sdl.h
@@ -47,6 +47,7 @@ void sys_handle_argv(int argc, char *argv[]);
void gui_message_loop(void);
extern bool background; /* True if the background image is enabled */
+extern bool showremote;
extern int display_zoom;
extern long start_tick;