Add a bit more debug output to checkwps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28552 a1c6a512-1295-4272-9138-f99709370657
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index ad3e7e4..a0466a8 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1115,12 +1115,17 @@
fd = open(img_path, O_RDONLY);
if (fd < 0)
+ {
+ DEBUGF("Couldn't open %s\n", img_path);
return false;
+ }
size_t buf_size = read_bmp_fd(fd, bitmap, 0,
format|FORMAT_RETURN_SIZE, NULL);
char* imgbuf = (char*)skin_buffer_alloc(buf_size);
if (!imgbuf)
{
+ DEBUGF("Not enough skin buffer: need %ld more.\n",
+ buf_size - skin_buffer_freespace());
close(fd);
return NULL;
}
diff --git a/lib/skin_parser/skin_debug.c b/lib/skin_parser/skin_debug.c
index a09cd67..ce5af7d 100644
--- a/lib/skin_parser/skin_debug.c
+++ b/lib/skin_parser/skin_debug.c
@@ -296,6 +296,8 @@
{
int i;
char text[128];
+ if (!error_line_start)
+ return;
char* line_end = strchr(error_line_start, '\n');
int len = MIN(line_end - error_line_start, 80);
if (!line_end)