mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
Fix STRIDE macro for multiscreen and add stride support for picture lib.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22615 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f6025186fd
commit
25123570c7
28 changed files with 194 additions and 112 deletions
|
|
@ -69,7 +69,7 @@ static struct viewport default_vp =
|
|||
|
||||
/* The Gigabeat target build requires access to the current fg_pattern
|
||||
in lcd-meg-fx.c */
|
||||
#if (!defined(TOSHIBA_GIGABEAT_F)&& !defined(TOSHIBA_GIGABEAT_S)) || defined(SIMULATOR)
|
||||
#if defined(SIMULATOR)
|
||||
static struct viewport* current_vp IDATA_ATTR = &default_vp;
|
||||
#else
|
||||
struct viewport* current_vp IDATA_ATTR = &default_vp;
|
||||
|
|
@ -853,7 +853,7 @@ void ICODE_ATTR lcd_bitmap_part(const fb_data *src, int src_x, int src_y,
|
|||
/* Draw a full native bitmap */
|
||||
void lcd_bitmap(const fb_data *src, int x, int y, int width, int height)
|
||||
{
|
||||
lcd_bitmap_part(src, 0, 0, STRIDE(width, height), x, y, width, height);
|
||||
lcd_bitmap_part(src, 0, 0, STRIDE(SCREEN_MAIN, width, height), x, y, width, height);
|
||||
}
|
||||
|
||||
#if !defined(TOSHIBA_GIGABEAT_F) && !defined(TOSHIBA_GIGABEAT_S) \
|
||||
|
|
@ -914,7 +914,7 @@ void lcd_bitmap_transparent(const fb_data *src, int x, int y,
|
|||
int width, int height)
|
||||
{
|
||||
lcd_bitmap_transparent_part(src, 0, 0,
|
||||
STRIDE(width, height), x, y, width, height);
|
||||
STRIDE(SCREEN_MAIN, width, height), x, y, width, height);
|
||||
}
|
||||
|
||||
#include "lcd-bitmap-common.c"
|
||||
|
|
|
|||
|
|
@ -306,12 +306,24 @@ 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)
|
||||
enum screen_type {
|
||||
SCREEN_MAIN
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
,SCREEN_REMOTE
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Frame buffer stride */
|
||||
#define STRIDE_REMOTE(w, h) (w)
|
||||
|
||||
#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
|
||||
#define STRIDE_MAIN(w, h) (h)
|
||||
#else
|
||||
#define STRIDE_MAIN(w, h) (w)
|
||||
#endif
|
||||
|
||||
#define STRIDE(screen, w, h) (screen==SCREEN_MAIN?STRIDE_MAIN((w), \
|
||||
(h)):STRIDE_REMOTE((w),(h)))
|
||||
|
||||
/* Frame buffer dimensions */
|
||||
#if LCD_DEPTH == 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue