summaryrefslogtreecommitdiff
path: root/uisimulator/sdl/uisdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/sdl/uisdl.c')
-rw-r--r--uisimulator/sdl/uisdl.c40
1 files changed, 31 insertions, 9 deletions
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);
48 48
49SDL_Surface *gui_surface; 49SDL_Surface *gui_surface;
50bool background = true; /* use backgrounds by default */ 50bool background = true; /* use backgrounds by default */
51#ifdef HAVE_REMOTE_LCD
52static bool showremote = true; /* include remote by default */
53#endif
51 54
52bool lcd_display_redraw = true; /* Used for player simulator */ 55bool lcd_display_redraw = true; /* Used for player simulator */
53char having_new_lcd = true; /* Used for player simulator */ 56char having_new_lcd = true; /* Used for player simulator */
@@ -124,18 +127,25 @@ bool gui_startup(void)
124 } 127 }
125 128
126 /* Set things up */ 129 /* Set things up */
127 130 if (background)
128 if (background) { 131 {
129 width = UI_WIDTH; 132 width = UI_WIDTH;
130 height = UI_HEIGHT; 133 height = UI_HEIGHT;
131 } else { 134 }
135 else
136 {
132#ifdef HAVE_REMOTE_LCD 137#ifdef HAVE_REMOTE_LCD
133 width = SIM_LCD_WIDTH > SIM_REMOTE_WIDTH ? SIM_LCD_WIDTH : SIM_REMOTE_WIDTH; 138 if (showremote)
134 height = SIM_LCD_HEIGHT + SIM_REMOTE_HEIGHT; 139 {
135#else 140 width = SIM_LCD_WIDTH > SIM_REMOTE_WIDTH ? SIM_LCD_WIDTH : SIM_REMOTE_WIDTH;
136 width = SIM_LCD_WIDTH; 141 height = SIM_LCD_HEIGHT + SIM_REMOTE_HEIGHT;
137 height = SIM_LCD_HEIGHT; 142 }
143 else
138#endif 144#endif
145 {
146 width = SIM_LCD_WIDTH;
147 height = SIM_LCD_HEIGHT;
148 }
139 } 149 }
140 150
141 151
@@ -148,7 +158,8 @@ bool gui_startup(void)
148 158
149 sim_lcd_init(); 159 sim_lcd_init();
150#ifdef HAVE_REMOTE_LCD 160#ifdef HAVE_REMOTE_LCD
151 sim_lcd_remote_init(); 161 if (showremote)
162 sim_lcd_remote_init();
152#endif 163#endif
153 164
154 SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); 165 SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
@@ -197,6 +208,14 @@ int main(int argc, char *argv[])
197 background = false; 208 background = false;
198 printf("Disabling background image.\n"); 209 printf("Disabling background image.\n");
199 } 210 }
211#ifdef HAVE_REMOTE_LCD
212 else if (!strcmp("--noremote", argv[x]))
213 {
214 showremote = false;
215 background = false;
216 printf("Disabling remote image.\n");
217 }
218#endif
200 else if (!strcmp("--old_lcd", argv[x])) 219 else if (!strcmp("--old_lcd", argv[x]))
201 { 220 {
202 having_new_lcd = false; 221 having_new_lcd = false;
@@ -232,6 +251,9 @@ int main(int argc, char *argv[])
232 printf(" --debugaudio \t Write raw PCM data to audiodebug.raw\n"); 251 printf(" --debugaudio \t Write raw PCM data to audiodebug.raw\n");
233 printf(" --debugwps \t Print advanced WPS debug info\n"); 252 printf(" --debugwps \t Print advanced WPS debug info\n");
234 printf(" --nobackground \t Disable the background image\n"); 253 printf(" --nobackground \t Disable the background image\n");
254#ifdef HAVE_REMOTE_LCD
255 printf(" --noremote \t Disable the remote image (will disable backgrounds)\n");
256#endif
235 printf(" --old_lcd \t [Player] simulate old playermodel (ROM version<4.51)\n"); 257 printf(" --old_lcd \t [Player] simulate old playermodel (ROM version<4.51)\n");
236 printf(" --zoom [VAL]\t Window zoom (will disable backgrounds)\n"); 258 printf(" --zoom [VAL]\t Window zoom (will disable backgrounds)\n");
237 printf(" --alarm \t Simulate a wake-up on alarm\n"); 259 printf(" --alarm \t Simulate a wake-up on alarm\n");