From b341f5d594c10ff541764a506dc8a2d5c6a8752a Mon Sep 17 00:00:00 2001 From: Steve Bavin Date: Mon, 26 Oct 2009 09:58:39 +0000 Subject: FS#10700 - Add --noremote option to simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23358 a1c6a512-1295-4272-9138-f99709370657 --- uisimulator/sdl/uisdl.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) (limited to 'uisimulator/sdl/uisdl.c') diff --git a/uisimulator/sdl/uisdl.c b/uisimulator/sdl/uisdl.c index d6a49d3a60..3ab098e5ba 100644 --- a/uisimulator/sdl/uisdl.c +++ b/uisimulator/sdl/uisdl.c @@ -48,6 +48,9 @@ void button_event(int key, bool pressed); SDL_Surface *gui_surface; bool background = true; /* use backgrounds by default */ +#ifdef HAVE_REMOTE_LCD +static bool showremote = true; /* include remote by default */ +#endif bool lcd_display_redraw = true; /* Used for player simulator */ char having_new_lcd = true; /* Used for player simulator */ @@ -124,18 +127,25 @@ bool gui_startup(void) } /* Set things up */ - - if (background) { + if (background) + { width = UI_WIDTH; height = UI_HEIGHT; - } else { + } + else + { #ifdef HAVE_REMOTE_LCD - width = SIM_LCD_WIDTH > SIM_REMOTE_WIDTH ? SIM_LCD_WIDTH : SIM_REMOTE_WIDTH; - height = SIM_LCD_HEIGHT + SIM_REMOTE_HEIGHT; -#else - width = SIM_LCD_WIDTH; - height = SIM_LCD_HEIGHT; + if (showremote) + { + width = SIM_LCD_WIDTH > SIM_REMOTE_WIDTH ? SIM_LCD_WIDTH : SIM_REMOTE_WIDTH; + height = SIM_LCD_HEIGHT + SIM_REMOTE_HEIGHT; + } + else #endif + { + width = SIM_LCD_WIDTH; + height = SIM_LCD_HEIGHT; + } } @@ -148,7 +158,8 @@ bool gui_startup(void) sim_lcd_init(); #ifdef HAVE_REMOTE_LCD - sim_lcd_remote_init(); + if (showremote) + sim_lcd_remote_init(); #endif SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); @@ -197,6 +208,14 @@ int main(int argc, char *argv[]) background = false; printf("Disabling background image.\n"); } +#ifdef HAVE_REMOTE_LCD + else if (!strcmp("--noremote", argv[x])) + { + showremote = false; + background = false; + printf("Disabling remote image.\n"); + } +#endif else if (!strcmp("--old_lcd", argv[x])) { having_new_lcd = false; @@ -232,6 +251,9 @@ int main(int argc, char *argv[]) printf(" --debugaudio \t Write raw PCM data to audiodebug.raw\n"); printf(" --debugwps \t Print advanced WPS debug info\n"); printf(" --nobackground \t Disable the background image\n"); +#ifdef HAVE_REMOTE_LCD + printf(" --noremote \t Disable the remote image (will disable backgrounds)\n"); +#endif printf(" --old_lcd \t [Player] simulate old playermodel (ROM version<4.51)\n"); printf(" --zoom [VAL]\t Window zoom (will disable backgrounds)\n"); printf(" --alarm \t Simulate a wake-up on alarm\n"); -- cgit v1.2.3