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
This commit is contained in:
Thomas Martitz 2010-05-18 12:27:20 +00:00
parent d3735578c3
commit 6cbc701d2a
8 changed files with 6 additions and 17 deletions

View file

@ -105,9 +105,7 @@ void LCDFN(update_viewport_rect)(int x, int y, int width, int height)
void LCDFN(init)(void) void LCDFN(init)(void)
{ {
LCDFN(clear_display)(); LCDFN(clear_display)();
#ifndef SIMULATOR
LCDFN(init_device)(); LCDFN(init_device)();
#endif
#ifdef MAIN_LCD #ifdef MAIN_LCD
scroll_init(); scroll_init();
#endif #endif

View file

@ -122,9 +122,7 @@ void LCDFN(init)(void)
{ {
LCDFN(set_viewport)(NULL); LCDFN(set_viewport)(NULL);
LCDFN(clear_display)(); LCDFN(clear_display)();
#ifndef SIMULATOR
LCDFN(init_device)(); LCDFN(init_device)();
#endif
#ifdef MAIN_LCD #ifdef MAIN_LCD
scroll_init(); scroll_init();
#endif #endif

View file

@ -160,7 +160,7 @@ void sim_backlight(int value)
#endif /* HAVE_BACKLIGHT */ #endif /* HAVE_BACKLIGHT */
/* initialise simulator lcd driver */ /* initialise simulator lcd driver */
void sim_lcd_init(void) void lcd_init_device(void)
{ {
#if LCD_DEPTH == 16 #if LCD_DEPTH == 16
lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE, lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE,

View file

@ -106,7 +106,7 @@ void sim_backlight(int value)
#endif #endif
/* initialise simulator lcd driver */ /* initialise simulator lcd driver */
void sim_lcd_init(void) void lcd_init_device(void)
{ {
lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE, lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
SIM_LCD_WIDTH * display_zoom, SIM_LCD_WIDTH * display_zoom,

View file

@ -98,8 +98,10 @@ void sim_remote_backlight(int value)
} }
/* initialise simulator lcd remote driver */ /* 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, remote_surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
LCD_REMOTE_WIDTH * display_zoom, LCD_REMOTE_WIDTH * display_zoom,
LCD_REMOTE_HEIGHT * display_zoom, LCD_REMOTE_HEIGHT * display_zoom,

View file

@ -140,12 +140,6 @@ static int sdl_event_thread(void * param)
SDL_WM_SetCaption(UI_TITLE, NULL); 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) if (background && picture_surface != NULL)
SDL_BlitSurface(picture_surface, NULL, gui_surface, NULL); SDL_BlitSurface(picture_surface, NULL, gui_surface, NULL);

View file

@ -47,6 +47,7 @@ void sys_handle_argv(int argc, char *argv[]);
void gui_message_loop(void); void gui_message_loop(void);
extern bool background; /* True if the background image is enabled */ extern bool background; /* True if the background image is enabled */
extern bool showremote;
extern int display_zoom; extern int display_zoom;
extern long start_tick; extern long start_tick;

View file

@ -269,10 +269,6 @@ void lcd_set_contrast( int x )
(void)x; (void)x;
} }
void lcd_init_device(void)
{
}
void mpeg_set_pitch(int pitch) void mpeg_set_pitch(int pitch)
{ {
(void)pitch; (void)pitch;