rendered paste bodyIndex: apps/gui/wps_parser.c
===================================================================
--- apps/gui/wps_parser.c (révision 13256)
+++ apps/gui/wps_parser.c (copie de travail)
@@ -42,6 +42,10 @@
#define PARSE_FAIL_INVALID_CHAR 2
#define PARSE_FAIL_COND_SYNTAX_ERROR 3
+#ifdef SIMULATOR
+extern bool debug_wps;
+#endif
+
/* level of current conditional.
-1 means we're not in a conditional. */
static int level = -1;
@@ -796,14 +800,17 @@
#ifdef DEBUG
-#if 0 /* optional debugging code */
- dump_wps_tokens(data);
- print_line_info(data);
- print_wps_strings(data);
+#ifdef SIMULATOR
+ if (debug_wps)
+ {
+ dump_wps_tokens(data);
+ print_line_info(data);
+ print_wps_strings(data);
#ifdef HAVE_LCD_BITMAP
- print_img_cond_indexes(data);
+ print_img_cond_indexes(data);
#endif
-#endif
+ }
+#endif /* SIMULATOR */
if (fail)
{
Index: uisimulator/sdl/uisdl.c
===================================================================
--- uisimulator/sdl/uisdl.c (révision 13256)
+++ uisimulator/sdl/uisdl.c (copie de travail)
@@ -55,6 +55,8 @@
bool debug_audio = false;
+bool debug_wps = false;
+
long start_tick;
Uint32 tick_timer(Uint32 interval, void *param)
@@ -200,6 +202,9 @@
if (!strcmp("--debugaudio", argv[x])) {
debug_audio = true;
printf("Writing debug audio file.\n");
+ } else if (!strcmp("--debugwps", argv[x])) {
+ debug_wps = true;
+ printf("WPS debug mode.\n");
} else if (!strcmp("--background", argv[x])) {
background = true;
printf("Using background image.\n");
@@ -217,9 +222,10 @@
printf("rockboxui\n");
printf("Arguments:\n");
printf(" --debugaudio \t Write raw PCM data to audiodebug.raw\n");
+ printf(" --debugwps \t Print advanced WPS debug info\n");
printf(" --background \t Use background image of hardware\n");
printf(" --old_lcd \t [Player] simulate old playermodel (ROM version<4.51)\n");
- printf(" --zoom \t window zoom (will disable backgrounds)\n");
+ printf(" --zoom [VAL]\t window zoom (will disable backgrounds)\n");
exit(0);
}
}