diff options
-rw-r--r-- | apps/plugins/pacbox/pacbox.h | 6 | ||||
-rw-r--r-- | apps/plugins/pacbox/pacbox_lcd.c | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h index 273408875e..99d9e2ffee 100644 --- a/apps/plugins/pacbox/pacbox.h +++ b/apps/plugins/pacbox/pacbox.h | |||
@@ -293,7 +293,13 @@ | |||
293 | #define YOFS ((LCD_HEIGHT-224/2)/2) | 293 | #define YOFS ((LCD_HEIGHT-224/2)/2) |
294 | #elif (LCD_WIDTH >= 128) | 294 | #elif (LCD_WIDTH >= 128) |
295 | #define XOFS ((LCD_WIDTH-224/2)/2) | 295 | #define XOFS ((LCD_WIDTH-224/2)/2) |
296 | #if LCD_HEIGHT < 144 | ||
296 | #define YCLIP ((288-2*LCD_HEIGHT)/2) | 297 | #define YCLIP ((288-2*LCD_HEIGHT)/2) |
298 | #define YOFS 0 | ||
299 | #else | ||
300 | #define YCLIP 0 | ||
301 | #define YOFS ((LCD_HEIGHT-288/2)/2) | ||
302 | #endif | ||
297 | #endif | 303 | #endif |
298 | 304 | ||
299 | /* How many video frames (out of a possible 60) we display each second. | 305 | /* How many video frames (out of a possible 60) we display each second. |
diff --git a/apps/plugins/pacbox/pacbox_lcd.c b/apps/plugins/pacbox/pacbox_lcd.c index 04bfe5f797..bc2de20858 100644 --- a/apps/plugins/pacbox/pacbox_lcd.c +++ b/apps/plugins/pacbox/pacbox_lcd.c | |||
@@ -106,11 +106,13 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf) | |||
106 | vbuf+=ScreenWidth; | 106 | vbuf+=ScreenWidth; |
107 | } | 107 | } |
108 | #elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 128) | 108 | #elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 128) |
109 | /* 0.5 scaling - display every other pixel = 112x144, crop to 112x128 */ | 109 | /* 0.5 scaling - display every other pixel |
110 | * LCD_HEIGHT < 144: 112x144, crop to 112x128 | ||
111 | * else center vertically without clipping */ | ||
110 | (void)next_dst; | 112 | (void)next_dst; |
111 | dst=&lcd_framebuffer[XOFS]; | 113 | dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS]; |
112 | 114 | ||
113 | /* Skip first 16 lines */ | 115 | /* Skip first YCLIP lines */ |
114 | vbuf+=ScreenWidth*YCLIP; | 116 | vbuf+=ScreenWidth*YCLIP; |
115 | 117 | ||
116 | /* Show regular screen */ | 118 | /* Show regular screen */ |