Merge from ClockworkMod recovery

Change-Id: Id5b312147173ced559a62d97029acede6c2f8766
diff --git a/minui/graphics.c b/minui/graphics.c
index 4127c40..a96342f 100644
--- a/minui/graphics.c
+++ b/minui/graphics.c
@@ -29,7 +29,12 @@
 
 #include <pixelflinger/pixelflinger.h>
 
-#include "font_10x18.h"
+#ifndef BOARD_LDPI_RECOVERY
+	#include "font_10x18.h"
+#else
+	#include "font_7x16.h"
+#endif
+
 #include "minui.h"
 
 typedef struct {
@@ -85,7 +90,7 @@
     fb->version = sizeof(*fb);
     fb->width = vi.xres;
     fb->height = vi.yres;
-    fb->stride = vi.xres;
+    fb->stride = fi.line_length/2; /* stride is the number of pixels until the data of next row, >= xres */;
     fb->data = bits;
     fb->format = GGL_PIXEL_FORMAT_RGB_565;
     memset(fb->data, 0, vi.yres * vi.xres * 2);
@@ -95,8 +100,8 @@
     fb->version = sizeof(*fb);
     fb->width = vi.xres;
     fb->height = vi.yres;
-    fb->stride = vi.xres;
-    fb->data = (void*) (((unsigned) bits) + vi.yres * vi.xres * 2);
+    fb->stride = fi.line_length/2;
+    fb->data = (void*) (((unsigned) bits) + vi.yres * fi.line_length / 2);
     fb->format = GGL_PIXEL_FORMAT_RGB_565;
     memset(fb->data, 0, vi.yres * vi.xres * 2);