From 7bb7c5f0cc7bf5b5172aeb4d75ef886b19755863 Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Sat, 29 Aug 2009 19:31:29 +0000 Subject: Add stride defines to support vertical strides git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22546 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config.h | 4 ++++ firmware/export/lcd.h | 7 +++++++ 2 files changed, 11 insertions(+) (limited to 'firmware/export') diff --git a/firmware/export/config.h b/firmware/export/config.h index 18dca402fb..13d272f7b7 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -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 diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 5846fae9c1..3d391d6685 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -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 -- cgit v1.2.3