diff options
author | Sebastian Leonhardt <sebastian.leonhardt@web.de> | 2018-07-28 01:00:44 +0200 |
---|---|---|
committer | Sebastian Leonhardt <sebastian.leonhardt@web.de> | 2018-08-05 15:19:07 +0200 |
commit | 91500e12961a8cd7410c5be15ffbd8eba05feae1 (patch) | |
tree | 68d45a5dfe91d511f54946df540ffa64cfbffa58 /apps/plugins/pacbox | |
parent | 5dfcadc45bdecd2d5f075e9792e0c7ca65f9bb5f (diff) | |
download | rockbox-91500e12961a8cd7410c5be15ffbd8eba05feae1.tar.gz rockbox-91500e12961a8cd7410c5be15ffbd8eba05feae1.zip |
pacbox: fix screen and buttons for Creative Zen
* rotate screen counterclockwise
* rotate directional buttons
Change-Id: Icbdf26fe1e14638eb8b0746a9eea99e0236ac6b1
Diffstat (limited to 'apps/plugins/pacbox')
-rw-r--r-- | apps/plugins/pacbox/pacbox.h | 15 | ||||
-rw-r--r-- | apps/plugins/pacbox/pacbox_lcd.c | 10 |
2 files changed, 21 insertions, 4 deletions
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h index 5eb9103d90..3461bd62c7 100644 --- a/apps/plugins/pacbox/pacbox.h +++ b/apps/plugins/pacbox/pacbox.h @@ -340,10 +340,10 @@ #define PACMAN_COIN BUTTON_PLAY #elif CONFIG_KEYPAD == CREATIVE_ZEN_PAD -#define PACMAN_UP BUTTON_UP -#define PACMAN_DOWN BUTTON_DOWN -#define PACMAN_LEFT BUTTON_LEFT -#define PACMAN_RIGHT BUTTON_RIGHT +#define PACMAN_UP BUTTON_LEFT +#define PACMAN_DOWN BUTTON_RIGHT +#define PACMAN_LEFT BUTTON_DOWN +#define PACMAN_RIGHT BUTTON_UP #define PACMAN_MENU BUTTON_MENU #define PACMAN_1UP BUTTON_SELECT #define PACMAN_COIN BUTTON_PLAYPAUSE @@ -406,10 +406,17 @@ #define YOFS ((LCD_HEIGHT-288)/2) #elif (LCD_WIDTH >= 288) && (LCD_HEIGHT >= 224) +#if defined(CREATIVE_ZEN) +#define LCD_SCALE 100 +#define LCD_ROTATE 2 +#define XOFS ((LCD_WIDTH-288)/2) +#define YOFS ((LCD_HEIGHT-224)/2) +#else #define LCD_SCALE 100 #define LCD_ROTATE 1 #define XOFS ((LCD_WIDTH-288)/2) #define YOFS ((LCD_HEIGHT-224)/2) +#endif #elif (LCD_WIDTH >= 168) && (LCD_HEIGHT >= 216) #define LCD_SCALE 75 diff --git a/apps/plugins/pacbox/pacbox_lcd.c b/apps/plugins/pacbox/pacbox_lcd.c index bf4aa9f028..172faf3f84 100644 --- a/apps/plugins/pacbox/pacbox_lcd.c +++ b/apps/plugins/pacbox/pacbox_lcd.c @@ -55,6 +55,16 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf) dst+=LCD_WIDTH; } } +#elif LCD_SCALE==100 && LCD_ROTATE==2 + /* Native resolution - rotated 270 degrees = 288x224 */ + next_dst=&lcd_framebuffer[(LCD_HEIGHT-YOFS)*LCD_WIDTH+XOFS]; + for( y=0; y<ScreenHeight; y++ ) { + dst = (next_dst++); + for( x=ScreenWidth-1; x>=0; x-- ) { + *dst = palette[*(vbuf++)]; + dst-=LCD_WIDTH; + } + } #elif LCD_SCALE==75 && LCD_ROTATE==1 /* 0.75 scaling - display 3 out of 4 pixels - rotated = 216x168 Skipping pixel #2 out of 4 seems to give the most legible display |