From 2707b87767cea8b0cf14d749ce092c0a29953c14 Mon Sep 17 00:00:00 2001 From: Themaister Date: Wed, 9 Nov 2011 23:58:14 +0100 Subject: [PATCH] Should fix overscan overcrop. --- ssnes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ssnes.c b/ssnes.c index 39d35f1e83..334c698839 100644 --- a/ssnes.c +++ b/ssnes.c @@ -138,16 +138,17 @@ static void take_screenshot(void) static inline void adjust_crop(const uint16_t **data, unsigned *height) { // Rather SNES specific. + unsigned pixel_pitch = lines_to_pitch(*height) >> 1; if (g_settings.video.crop_overscan) { if (*height == 239) { - *data += 7 * 1024; // Skip 7 top scanlines. + *data += 7 * pixel_pitch; // Skip 7 top scanlines. *height = 224; } else if (*height == 478) { - *data += 15 * 512; // Skip 15 top scanlines. + *data += 15 * pixel_pitch; // Skip 15 top scanlines. *height = 448; } }