diff options
Diffstat (limited to 'apps/plugins/pacbox/pacbox.h')
-rw-r--r-- | apps/plugins/pacbox/pacbox.h | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/apps/plugins/pacbox/pacbox.h b/apps/plugins/pacbox/pacbox.h index bb132f7c4c..77a107bec4 100644 --- a/apps/plugins/pacbox/pacbox.h +++ b/apps/plugins/pacbox/pacbox.h | |||
@@ -373,22 +373,42 @@ | |||
373 | #endif | 373 | #endif |
374 | #endif | 374 | #endif |
375 | 375 | ||
376 | #if (LCD_HEIGHT >= 288) | 376 | /* Calculate scaling and screen offset/clipping. |
377 | Put native portrait mode before landscape, if a screen resulution allows both. | ||
378 | */ | ||
379 | #if (LCD_WIDTH >= 224) && (LCD_HEIGHT >= 288) | ||
380 | #define LCD_SCALE 100 | ||
381 | #define LCD_ROTATE 0 | ||
377 | #define XOFS ((LCD_WIDTH-224)/2) | 382 | #define XOFS ((LCD_WIDTH-224)/2) |
378 | #define YOFS ((LCD_HEIGHT-288)/2) | 383 | #define YOFS ((LCD_HEIGHT-288)/2) |
379 | #elif (LCD_WIDTH >= 288) | 384 | |
385 | #elif (LCD_WIDTH >= 288) && (LCD_HEIGHT >= 224) | ||
386 | #define LCD_SCALE 100 | ||
387 | #define LCD_ROTATE 1 | ||
380 | #define XOFS ((LCD_WIDTH-288)/2) | 388 | #define XOFS ((LCD_WIDTH-288)/2) |
381 | #define YOFS ((LCD_HEIGHT-224)/2) | 389 | #define YOFS ((LCD_HEIGHT-224)/2) |
382 | #elif (LCD_WIDTH >= 220) | 390 | |
383 | #define XOFS ((LCD_WIDTH-(288*3/4))/2) | ||
384 | #define YOFS ((LCD_HEIGHT-(224*3/4))/2) | ||
385 | #elif (LCD_WIDTH >= 168) && (LCD_HEIGHT >= 216) | 391 | #elif (LCD_WIDTH >= 168) && (LCD_HEIGHT >= 216) |
392 | #define LCD_SCALE 75 | ||
393 | #define LCD_ROTATE 0 | ||
386 | #define XOFS ((LCD_WIDTH-(224*3/4))/2) | 394 | #define XOFS ((LCD_WIDTH-(224*3/4))/2) |
387 | #define YOFS ((LCD_HEIGHT-(288*3/4))/2) | 395 | #define YOFS ((LCD_HEIGHT-(288*3/4))/2) |
388 | #elif (LCD_WIDTH >= 144) | 396 | |
397 | #elif (LCD_WIDTH >= 216) && (LCD_HEIGHT >= 168) | ||
398 | #define LCD_SCALE 75 | ||
399 | #define LCD_ROTATE 1 | ||
400 | #define XOFS ((LCD_WIDTH-(288*3/4))/2) | ||
401 | #define YOFS ((LCD_HEIGHT-(224*3/4))/2) | ||
402 | |||
403 | #elif (LCD_WIDTH >= 144) && (LCD_HEIGHT >= 112) | ||
404 | #define LCD_SCALE 50 | ||
405 | #define LCD_ROTATE 1 | ||
389 | #define XOFS ((LCD_WIDTH-288/2)/2) | 406 | #define XOFS ((LCD_WIDTH-288/2)/2) |
390 | #define YOFS ((LCD_HEIGHT-224/2)/2) | 407 | #define YOFS ((LCD_HEIGHT-224/2)/2) |
391 | #elif (LCD_WIDTH >= 128) | 408 | |
409 | #elif (LCD_WIDTH >= 112) && (LCD_HEIGHT >= 128) | ||
410 | #define LCD_SCALE 50 | ||
411 | #define LCD_ROTATE 0 | ||
392 | #define XOFS ((LCD_WIDTH-224/2)/2) | 412 | #define XOFS ((LCD_WIDTH-224/2)/2) |
393 | #if LCD_HEIGHT < 144 | 413 | #if LCD_HEIGHT < 144 |
394 | #define YCLIP ((288-2*LCD_HEIGHT)/2) | 414 | #define YCLIP ((288-2*LCD_HEIGHT)/2) |
@@ -397,6 +417,9 @@ | |||
397 | #define YCLIP 0 | 417 | #define YCLIP 0 |
398 | #define YOFS ((LCD_HEIGHT-288/2)/2) | 418 | #define YOFS ((LCD_HEIGHT-288/2)/2) |
399 | #endif | 419 | #endif |
420 | |||
421 | #else | ||
422 | #error "unsupported screen resolution" | ||
400 | #endif | 423 | #endif |
401 | 424 | ||
402 | /* How many video frames (out of a possible 60) we display each second. | 425 | /* How many video frames (out of a possible 60) we display each second. |