From 2be23553c4af2d5e3130b035f4ac3b9550889ba7 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 28 Aug 2010 23:55:09 +0200 Subject: [PATCH] Pitch fix --- ssnes.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ssnes.c b/ssnes.c index e23d3a7203..48d2bd2f4e 100644 --- a/ssnes.c +++ b/ssnes.c @@ -213,9 +213,13 @@ static void uninit_video_input(void) static inline void process_frame (uint16_t * restrict out, const uint16_t * restrict in, unsigned width, unsigned height) { + int pitch = 1024; + if ( height == 448 || height == 478 ) + pitch = 512; + for ( int y = 0; y < height; y++ ) { - const uint16_t *src = in + y * 1024; + const uint16_t *src = in + y * pitch; uint16_t *dst = out + y * width; memcpy(dst, src, width * sizeof(uint16_t));