summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/ipod
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-01-03 07:03:07 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-01-03 07:03:07 +0000
commitb23e51050f5cfc240ffeb33dbab402d92d6c9a81 (patch)
tree2b1c315348dd96b255ee7938e02a2e4f053f3161 /firmware/target/arm/ipod
parent152847977a420487d9c3728841101ef708e41373 (diff)
downloadrockbox-b23e51050f5cfc240ffeb33dbab402d92d6c9a81.tar.gz
rockbox-b23e51050f5cfc240ffeb33dbab402d92d6c9a81.tar.bz2
rockbox-b23e51050f5cfc240ffeb33dbab402d92d6c9a81.zip
Remove unneeded check for swapping in iPod nano1G/color LCD driver. For nano1G and color yo/y1 this swap never happened, for color x0/x1 it was always swapped.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28956 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod')
-rw-r--r--firmware/target/arm/ipod/lcd-color_nano.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/firmware/target/arm/ipod/lcd-color_nano.c b/firmware/target/arm/ipod/lcd-color_nano.c
index 8cff7bda21..0b62666c81 100644
--- a/firmware/target/arm/ipod/lcd-color_nano.c
+++ b/firmware/target/arm/ipod/lcd-color_nano.c
@@ -32,9 +32,6 @@
#include "system.h"
#include "hwcompat.h"
-/*** macros ***/
-#define SWAP_INT(X,Y) {int tmp=X; X=Y; Y=tmp;}
-
/* LCD command codes for HD66789R */
#define LCD_CNTL_RAM_ADDR_SET 0x21
#define LCD_CNTL_WRITE_TO_GRAM 0x22
@@ -136,9 +133,9 @@ static void lcd_setup_drawing_region(int x, int y, int width, int height)
x1 = (y + height) - 1; /* max vert */
#elif CONFIG_LCD == LCD_IPODCOLOR
y0 = y; /* start vert */
- x0 = (LCD_WIDTH - 1) - x; /* start horiz */
+ x0 = LCD_WIDTH - (x + width); /* start horiz */
y1 = (y + height) - 1; /* end vert */
- x1 = (x0 - width) + 1; /* end horiz */
+ x1 = (x0 + width) - 1; /* end horiz */
#endif
/* setup the drawing region */
@@ -148,9 +145,6 @@ static void lcd_setup_drawing_region(int x, int y, int width, int height)
lcd_cmd_data(0x15, y1); /* end vert */
lcd_cmd_data(0x16, x1); /* end horiz */
} else {
- if (y1 < y0) SWAP_INT(y0,y1) /* swap max horiz < start horiz */
- if (x1 < x0) SWAP_INT(x0,x1) /* swap max vert < start vert */
-
/* max horiz << 8 | start horiz */
lcd_cmd_data(LCD_CNTL_HORIZ_RAM_ADDR_POS, (y1 << 8) | y0);
/* max vert << 8 | start vert */