Add stride defines to support vertical strides

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22546 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Karl Kurbjun 2009-08-29 19:31:29 +00:00
parent 47541e5f2f
commit 7bb7c5f0cc
5 changed files with 29 additions and 10 deletions

View file

@ -206,6 +206,10 @@
#define RGB565 565
#define RGB565SWAPPED 3553
/* LCD_STRIDEFORMAT */
#define VERTICAL_STRIDE 1
#define HORIZONTAL_STRIDE 2
/* CONFIG_ORIENTATION */
#define SCREEN_PORTRAIT 0
#define SCREEN_LANDSCAPE 1

View file

@ -306,6 +306,13 @@ static inline unsigned lcd_color_to_native(unsigned color)
#endif /* HAVE_LCD_COLOR */
/* Frame buffer stride */
#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
#define STRIDE(w, h) (h)
#else
#define STRIDE(w, h) (w)
#endif
/* Frame buffer dimensions */
#if LCD_DEPTH == 1
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING