summaryrefslogtreecommitdiff
path: root/apps/plugins/pacbox/pacbox_lcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pacbox/pacbox_lcd.c')
-rw-r--r--apps/plugins/pacbox/pacbox_lcd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/plugins/pacbox/pacbox_lcd.c b/apps/plugins/pacbox/pacbox_lcd.c
index bc2de20858..6bb51a038d 100644
--- a/apps/plugins/pacbox/pacbox_lcd.c
+++ b/apps/plugins/pacbox/pacbox_lcd.c
@@ -35,7 +35,7 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
35 int x,y; 35 int x,y;
36 36
37#ifdef HAVE_LCD_COLOR 37#ifdef HAVE_LCD_COLOR
38#if (LCD_WIDTH >= 224) && (LCD_HEIGHT >= 288) 38#if LCD_SCALE==100 && LCD_ROTATE==0
39 /* Native resolution = 224x288 */ 39 /* Native resolution = 224x288 */
40 (void)next_dst; 40 (void)next_dst;
41 dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS]; 41 dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS];
@@ -45,7 +45,7 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
45 } 45 }
46 dst += XOFS*2; 46 dst += XOFS*2;
47 } 47 }
48#elif (LCD_WIDTH >= 288) && (LCD_HEIGHT >= 224) 48#elif LCD_SCALE==100 && LCD_ROTATE==1
49 /* Native resolution - rotated 90 degrees = 288x224 */ 49 /* Native resolution - rotated 90 degrees = 288x224 */
50 next_dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS+ScreenHeight-1]; 50 next_dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS+ScreenHeight-1];
51 for( y=ScreenHeight-1; y>=0; y-- ) { 51 for( y=ScreenHeight-1; y>=0; y-- ) {
@@ -55,7 +55,7 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
55 dst+=LCD_WIDTH; 55 dst+=LCD_WIDTH;
56 } 56 }
57 } 57 }
58#elif (LCD_WIDTH >= 216) && (LCD_HEIGHT >= 168) 58#elif LCD_SCALE==75 && LCD_ROTATE==1
59 /* 0.75 scaling - display 3 out of 4 pixels - rotated = 216x168 59 /* 0.75 scaling - display 3 out of 4 pixels - rotated = 216x168
60 Skipping pixel #2 out of 4 seems to give the most legible display 60 Skipping pixel #2 out of 4 seems to give the most legible display
61 */ 61 */
@@ -74,7 +74,7 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
74 vbuf+=ScreenWidth; 74 vbuf+=ScreenWidth;
75 } 75 }
76 } 76 }
77#elif (LCD_WIDTH >= 168) && (LCD_HEIGHT >= 216) 77#elif LCD_SCALE==75 && LCD_ROTATE==0
78 /* 0.75 scaling - display 3 out of 4 pixels - = 168x216 78 /* 0.75 scaling - display 3 out of 4 pixels - = 168x216
79 Skipping pixel #2 out of 4 seems to give the most legible display 79 Skipping pixel #2 out of 4 seems to give the most legible display
80 */ 80 */
@@ -93,7 +93,7 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
93 vbuf+=ScreenWidth; 93 vbuf+=ScreenWidth;
94 } 94 }
95 } 95 }
96#elif (LCD_WIDTH >= 144) && (LCD_HEIGHT >= 112) 96#elif LCD_SCALE==50 && LCD_ROTATE==1
97 /* 0.5 scaling - display every other pixel - rotated = 144x112 */ 97 /* 0.5 scaling - display every other pixel - rotated = 144x112 */
98 next_dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS+ScreenHeight/2-1]; 98 next_dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS+ScreenHeight/2-1];
99 for (y=(ScreenHeight/2)-1;y >= 0; y--) { 99 for (y=(ScreenHeight/2)-1;y >= 0; y--) {
@@ -105,7 +105,7 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
105 } 105 }
106 vbuf+=ScreenWidth; 106 vbuf+=ScreenWidth;
107 } 107 }
108#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 128) 108#elif LCD_SCALE==50 && LCD_ROTATE==0
109 /* 0.5 scaling - display every other pixel 109 /* 0.5 scaling - display every other pixel
110 * LCD_HEIGHT < 144: 112x144, crop to 112x128 110 * LCD_HEIGHT < 144: 112x144, crop to 112x128
111 * else center vertically without clipping */ 111 * else center vertically without clipping */
@@ -126,7 +126,7 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
126 } 126 }
127#endif 127#endif
128#else /* Greyscale LCDs */ 128#else /* Greyscale LCDs */
129#if (LCD_WIDTH >= 144) && (LCD_HEIGHT >= 112) 129#if LCD_SCALE==50 && LCD_ROTATE==1
130#if LCD_PIXELFORMAT == VERTICAL_PACKING 130#if LCD_PIXELFORMAT == VERTICAL_PACKING
131 /* 0.5 scaling - display every other pixel = 144x112 */ 131 /* 0.5 scaling - display every other pixel = 144x112 */
132 next_dst=&lcd_framebuffer[YOFS/4*LCD_WIDTH+XOFS+ScreenHeight/2-1]; 132 next_dst=&lcd_framebuffer[YOFS/4*LCD_WIDTH+XOFS+ScreenHeight/2-1];
@@ -140,6 +140,6 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
140 vbuf+=ScreenWidth; 140 vbuf+=ScreenWidth;
141 } 141 }
142#endif /* Vertical Packing */ 142#endif /* Vertical Packing */
143#endif /* Size >= 144x112 */ 143#endif /* scale 50% rotated */
144#endif /* Not Colour */ 144#endif /* Not Colour */
145} 145}