change the SCREEN_ROTATE define to be more meaningful, and set the mr500 orientation to landscape by default
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15567 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
59a2862347
commit
28dfb54eeb
|
@ -49,8 +49,12 @@
|
|||
|
||||
/* LCD dimensions */
|
||||
#define CONFIG_LCD LCD_MROBE500
|
||||
#define SCREEN_ROTATE
|
||||
#if defined(SCREEN_ROTATE)
|
||||
|
||||
/* choose the lcd orientation. both work */
|
||||
/* #define CONFIG_ORIENTATION SCREEN_PORTAIT */
|
||||
#define CONFIG_ORIENTATION SCREEN_LANDSCAPE
|
||||
|
||||
#if CONFIG_ORIENTATION == SCREEN_PORTAIT
|
||||
#define LCD_WIDTH 480
|
||||
#define LCD_HEIGHT 640
|
||||
#else
|
||||
|
|
|
@ -118,6 +118,11 @@
|
|||
#define RGB565 565
|
||||
#define RGB565SWAPPED 3553
|
||||
|
||||
/* CONFIG_ORIENTATION */
|
||||
#define SCREEN_PORTAIT 0
|
||||
#define SCREEN_LANDSCAPE 1
|
||||
#define SCREEN_SQUARE 2
|
||||
|
||||
/* CONFIG_I2C */
|
||||
#define I2C_PLAYREC 1 /* Archos Player/Recorder style */
|
||||
#define I2C_ONDIO 2 /* Ondio style */
|
||||
|
@ -251,6 +256,16 @@
|
|||
#define CONFIG_RTC 0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_ORIENTATION
|
||||
#if LCD_HEIGHT > LCD_WIDTH
|
||||
#define CONFIG_ORIENTATION SCREEN_PORTAIT
|
||||
#elif LCD_HEIGHT < LCD_WIDTH
|
||||
#define CONFIG_ORIENTATION SCREEN_LANDSCAPE
|
||||
#else
|
||||
#define CONFIG_ORIENTATION SCREEN_SQUARE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* define this in the target config.h to use a different size */
|
||||
#ifndef CONFIG_DEFAULT_ICON_HEIGHT
|
||||
#define CONFIG_DEFAULT_ICON_HEIGHT 8
|
||||
|
|
|
@ -66,7 +66,7 @@ static int touch_to_pixels(short val_x, short val_y)
|
|||
{
|
||||
short x,y;
|
||||
|
||||
#ifdef SCREEN_ROTATE /* portait */
|
||||
#if CONFIG_ORIENTATION == SCREEN_PORTAIT
|
||||
x=val_x;
|
||||
y=val_y;
|
||||
#else
|
||||
|
@ -93,13 +93,13 @@ void button_init_device(void)
|
|||
/* GIO is the power button, set as input */
|
||||
IO_GIO_DIR0 |= 0x01;
|
||||
|
||||
#ifdef SCREEN_ROTATE /* portait */
|
||||
#if CONFIG_ORIENTATION == SCREEN_PORTAIT
|
||||
topleft.val_x = 200;
|
||||
topleft.val_y = 3900;
|
||||
|
||||
bottomright.val_x = 3880;
|
||||
bottomright.val_y = 270;
|
||||
#else /* landscape */
|
||||
#else
|
||||
topleft.val_x = 270;
|
||||
topleft.val_y = 200;
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ void lcd_update_rect(int x, int y, int width, int height)
|
|||
if (height <= 0)
|
||||
return; /* nothing left to do */
|
||||
|
||||
#if defined(SCREEN_ROTATE)
|
||||
#if CONFIG_ORIENTATION == SCREEN_PORTAIT
|
||||
dst = (fb_data *)FRAME + LCD_WIDTH*y + x;
|
||||
src = &lcd_framebuffer[y][x];
|
||||
|
||||
|
@ -149,7 +149,7 @@ void lcd_update(void)
|
|||
{
|
||||
if (!lcd_on)
|
||||
return;
|
||||
#if defined(SCREEN_ROTATE)
|
||||
#if CONFIG_ORIENTATION == SCREEN_PORTAIT
|
||||
lcd_copy_buffer_rect((fb_data *)FRAME, &lcd_framebuffer[0][0],
|
||||
LCD_WIDTH*LCD_HEIGHT, 1);
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue
Block a user