From e7c5abfc0ba6780f172f3197520f46ab5b7e6b3f Mon Sep 17 00:00:00 2001 From: Nach Date: Tue, 20 Nov 2007 15:36:20 +0000 Subject: [PATCH] Fixed HQ3x and 16 bit under SDL. git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@106 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/sdl/SDL.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/src/sdl/SDL.cpp b/src/sdl/SDL.cpp index 87f8a127..180abb77 100644 --- a/src/sdl/SDL.cpp +++ b/src/sdl/SDL.cpp @@ -2697,21 +2697,14 @@ void systemDrawScreen() } if(filterFunction) { - if(systemColorDepth == 16) { - filterFunction(pix+destWidth+4,destWidth+4, delta, - (u8*)surface->pixels,surface->pitch, - srcWidth, - srcHeight); - } else { - unsigned int destw = destWidth*(filter_enlarge == 2 ? 2 : 1)+4; - filterFunction(pix+destw, - destw, - delta, - (u8*)surface->pixels, - surface->pitch, - srcWidth, - srcHeight); - } + unsigned int destw = destWidth*((systemColorDepth == 16) ? 2 : 4) / filter_enlarge + 4; + filterFunction(pix+destw, + destw, + delta, + (u8*)surface->pixels, + surface->pitch, + srcWidth, + srcHeight); } else { int destPitch = surface->pitch; u8 *src = pix;