diff options
Diffstat (limited to 'uisimulator/sdl')
-rw-r--r-- | uisimulator/sdl/uisdl.c | 48 |
1 files changed, 37 insertions, 11 deletions
diff --git a/uisimulator/sdl/uisdl.c b/uisimulator/sdl/uisdl.c index d9c64abce2..15fc1333cb 100644 --- a/uisimulator/sdl/uisdl.c +++ b/uisimulator/sdl/uisdl.c | |||
@@ -56,6 +56,7 @@ SDL_TimerID tick_timer_id; | |||
56 | bool lcd_display_redraw = true; /* Used for player simulator */ | 56 | bool lcd_display_redraw = true; /* Used for player simulator */ |
57 | char having_new_lcd = true; /* Used for player simulator */ | 57 | char having_new_lcd = true; /* Used for player simulator */ |
58 | bool sim_alarm_wakeup = false; | 58 | bool sim_alarm_wakeup = false; |
59 | const char *sim_root_dir = NULL; | ||
59 | 60 | ||
60 | bool debug_audio = false; | 61 | bool debug_audio = false; |
61 | 62 | ||
@@ -195,40 +196,65 @@ bool gui_shutdown(void) | |||
195 | 196 | ||
196 | int main(int argc, char *argv[]) | 197 | int main(int argc, char *argv[]) |
197 | { | 198 | { |
198 | if (argc >= 1) { | 199 | if (argc >= 1) |
200 | { | ||
199 | int x; | 201 | int x; |
200 | for (x = 1; x < argc; x++) { | 202 | for (x = 1; x < argc; x++) |
201 | if (!strcmp("--debugaudio", argv[x])) { | 203 | { |
204 | if (!strcmp("--debugaudio", argv[x])) | ||
205 | { | ||
202 | debug_audio = true; | 206 | debug_audio = true; |
203 | printf("Writing debug audio file.\n"); | 207 | printf("Writing debug audio file.\n"); |
204 | } else if (!strcmp("--debugwps", argv[x])) { | 208 | } |
209 | else if (!strcmp("--debugwps", argv[x])) | ||
210 | { | ||
205 | debug_wps = true; | 211 | debug_wps = true; |
206 | printf("WPS debug mode enabled.\n"); | 212 | printf("WPS debug mode enabled.\n"); |
207 | } else if (!strcmp("--background", argv[x])) { | 213 | } |
214 | else if (!strcmp("--background", argv[x])) | ||
215 | { | ||
208 | background = true; | 216 | background = true; |
209 | printf("Using background image.\n"); | 217 | printf("Using background image.\n"); |
210 | } else if (!strcmp("--old_lcd", argv[x])) { | 218 | } |
219 | else if (!strcmp("--old_lcd", argv[x])) | ||
220 | { | ||
211 | having_new_lcd = false; | 221 | having_new_lcd = false; |
212 | printf("Using old LCD layout.\n"); | 222 | printf("Using old LCD layout.\n"); |
213 | } else if (!strcmp("--zoom", argv[x])) { | 223 | } |
224 | else if (!strcmp("--zoom", argv[x])) | ||
225 | { | ||
214 | x++; | 226 | x++; |
215 | if(x < argc) | 227 | if(x < argc) |
216 | display_zoom=atoi(argv[x]); | 228 | display_zoom=atoi(argv[x]); |
217 | else | 229 | else |
218 | display_zoom = 2; | 230 | display_zoom = 2; |
219 | printf("Window zoom is %d\n", display_zoom); | 231 | printf("Window zoom is %d\n", display_zoom); |
220 | } else if (!strcmp("--alarm", argv[x])) { | 232 | } |
233 | else if (!strcmp("--alarm", argv[x])) | ||
234 | { | ||
221 | sim_alarm_wakeup = true; | 235 | sim_alarm_wakeup = true; |
222 | printf("Simulating alarm wakeup.\n"); | 236 | printf("Simulating alarm wakeup.\n"); |
223 | } else { | 237 | } |
238 | else if (!strcmp("--root", argv[x])) | ||
239 | { | ||
240 | x++; | ||
241 | if (x < argc) | ||
242 | { | ||
243 | sim_root_dir = argv[x]; | ||
244 | printf("Root directory: %s\n", sim_root_dir); | ||
245 | } | ||
246 | } | ||
247 | else | ||
248 | { | ||
224 | printf("rockboxui\n"); | 249 | printf("rockboxui\n"); |
225 | printf("Arguments:\n"); | 250 | printf("Arguments:\n"); |
226 | printf(" --debugaudio \t Write raw PCM data to audiodebug.raw\n"); | 251 | printf(" --debugaudio \t Write raw PCM data to audiodebug.raw\n"); |
227 | printf(" --debugwps \t Print advanced WPS debug info\n"); | 252 | printf(" --debugwps \t Print advanced WPS debug info\n"); |
228 | printf(" --background \t Use background image of hardware\n"); | 253 | printf(" --background \t Use background image of hardware\n"); |
229 | printf(" --old_lcd \t [Player] simulate old playermodel (ROM version<4.51)\n"); | 254 | printf(" --old_lcd \t [Player] simulate old playermodel (ROM version<4.51)\n"); |
230 | printf(" --zoom [VAL]\t window zoom (will disable backgrounds)\n"); | 255 | printf(" --zoom [VAL]\t Window zoom (will disable backgrounds)\n"); |
231 | printf(" --alarm \t Simulate a wakup-up on Alarm\n"); | 256 | printf(" --alarm \t Simulate a wake-up on alarm\n"); |
257 | printf(" --root [DIR]\t Set root directory\n"); | ||
232 | exit(0); | 258 | exit(0); |
233 | } | 259 | } |
234 | } | 260 | } |