summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/bmp_smooth_scale.c2
-rw-r--r--apps/plugins/lib/osd.c8
-rw-r--r--apps/plugins/lib/pluginlib_bmp.c2
-rw-r--r--apps/plugins/lib/xlcd_scroll.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/apps/plugins/lib/bmp_smooth_scale.c b/apps/plugins/lib/bmp_smooth_scale.c
index c5f258cdbf..378ff96448 100644
--- a/apps/plugins/lib/bmp_smooth_scale.c
+++ b/apps/plugins/lib/bmp_smooth_scale.c
@@ -78,7 +78,7 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
78 fb_data *sptr, *dptr; 78 fb_data *sptr, *dptr;
79 int x, y, end; 79 int x, y, end;
80 int val_y = 0, val_x; 80 int val_y = 0, val_x;
81#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 81#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
82 const int sw = src_bmp->height; 82 const int sw = src_bmp->height;
83 const int sh = src_bmp->width; 83 const int sh = src_bmp->width;
84 const int dw = dest_bmp->height; 84 const int dw = dest_bmp->height;
diff --git a/apps/plugins/lib/osd.c b/apps/plugins/lib/osd.c
index 7d6e10a410..99f77da7dc 100644
--- a/apps/plugins/lib/osd.c
+++ b/apps/plugins/lib/osd.c
@@ -106,10 +106,10 @@ static struct osd grey_osd;
106# error Unknown 2-bit format; please define macros 106# error Unknown 2-bit format; please define macros
107# endif /* LCD_PIXELFORMAT */ 107# endif /* LCD_PIXELFORMAT */
108#elif LCD_DEPTH == 16 108#elif LCD_DEPTH == 16
109# if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 109# if LCD_STRIDEFORMAT == VERTICAL_STRIDE
110# define _OSD_HEIGHT2BYTES(h) ((h)*2) 110# define _OSD_HEIGHT2BYTES(h) ((h)*2)
111# define _OSD_BYTES2HEIGHT(b) ((b)/2) 111# define _OSD_BYTES2HEIGHT(b) ((b)/2)
112# else /* !defined(LCD_STRIDEFORMAT) || LCD_STRIDEFORMAT != VERTICAL_STRIDE */ 112# else /* LCD_STRIDEFORMAT != VERTICAL_STRIDE */
113# define _OSD_WIDTH2BYTES(w) ((w)*2) 113# define _OSD_WIDTH2BYTES(w) ((w)*2)
114# define _OSD_BYTES2WIDTH(b) ((b)/2) 114# define _OSD_BYTES2WIDTH(b) ((b)/2)
115# endif /* end stride type selection */ 115# endif /* end stride type selection */
@@ -160,7 +160,7 @@ static void * _osd_lcd_init_buffers(struct osd *osd, unsigned flags,
160 160
161 rb->viewport_set_fullscreen(&osd->vp, SCREEN_MAIN); 161 rb->viewport_set_fullscreen(&osd->vp, SCREEN_MAIN);
162 162
163#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 163#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
164 int colbytes = _OSD_HEIGHT2BYTES(LCD_HEIGHT); 164 int colbytes = _OSD_HEIGHT2BYTES(LCD_HEIGHT);
165 int bytecols = *bufsize / colbytes; 165 int bytecols = *bufsize / colbytes;
166 int w = _OSD_BYTES2WIDTH(bytecols); 166 int w = _OSD_BYTES2WIDTH(bytecols);
@@ -193,7 +193,7 @@ static void * _osd_lcd_init_buffers(struct osd *osd, unsigned flags,
193 w = _OSD_BYTES2WIDTH(_OSD_WIDTH2BYTES(w)); 193 w = _OSD_BYTES2WIDTH(_OSD_WIDTH2BYTES(w));
194 osd->lcd_bitmap_stride = _OSD_BYTES2HEIGHT(_OSD_HEIGHT2BYTES(LCD_HEIGHT)); 194 osd->lcd_bitmap_stride = _OSD_BYTES2HEIGHT(_OSD_HEIGHT2BYTES(LCD_HEIGHT));
195 osd->back_bitmap_stride = h; 195 osd->back_bitmap_stride = h;
196#else /* !defined(LCD_STRIDEFORMAT) || LCD_STRIDEFORMAT != VERTICAL_STRIDE */ 196#else /* LCD_STRIDEFORMAT != VERTICAL_STRIDE */
197 int rowbytes = _OSD_WIDTH2BYTES(LCD_WIDTH); 197 int rowbytes = _OSD_WIDTH2BYTES(LCD_WIDTH);
198 int byterows = *bufsize / rowbytes; 198 int byterows = *bufsize / rowbytes;
199 int w = _OSD_BYTES2WIDTH(rowbytes); 199 int w = _OSD_BYTES2WIDTH(rowbytes);
diff --git a/apps/plugins/lib/pluginlib_bmp.c b/apps/plugins/lib/pluginlib_bmp.c
index f3edfbf425..82f84b05af 100644
--- a/apps/plugins/lib/pluginlib_bmp.c
+++ b/apps/plugins/lib/pluginlib_bmp.c
@@ -94,7 +94,7 @@ int save_bmp_file( char* filename, struct bitmap *bm )
94*/ 94*/
95void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst) 95void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst)
96{ 96{
97#if defined(LCD_STRIDEFORMAT) && (LCD_STRIDEFORMAT == VERTICAL_STRIDE) 97#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
98 const int srcw = src->height; 98 const int srcw = src->height;
99 const int srch = src->width; 99 const int srch = src->width;
100 const int dstw = dst->height; 100 const int dstw = dst->height;
diff --git a/apps/plugins/lib/xlcd_scroll.c b/apps/plugins/lib/xlcd_scroll.c
index 5ac4a366e8..906f4eaae1 100644
--- a/apps/plugins/lib/xlcd_scroll.c
+++ b/apps/plugins/lib/xlcd_scroll.c
@@ -30,7 +30,7 @@
30static const unsigned short patterns[4] = {0xFFFF, 0xFF00, 0x00FF, 0x0000}; 30static const unsigned short patterns[4] = {0xFFFF, 0xFF00, 0x00FF, 0x0000};
31#endif 31#endif
32 32
33#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 33#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
34void xlcd_scroll_left(int count) 34void xlcd_scroll_left(int count)
35{ 35{
36 /*size_t dst_stride;*/ 36 /*size_t dst_stride;*/
@@ -668,4 +668,4 @@ void xlcd_scroll_down(int count)
668} 668}
669 669
670#endif /* LCD_PIXELFORMAT, LCD_DEPTH */ 670#endif /* LCD_PIXELFORMAT, LCD_DEPTH */
671#endif /* defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE */ 671#endif /* LCD_STRIDEFORMAT == VERTICAL_STRIDE */