From 5799164f37e1908baa95f309b33c29abd83d2f62 Mon Sep 17 00:00:00 2001 From: "gregory.hainaut@gmail.com" Date: Sat, 18 Sep 2010 23:02:46 +0000 Subject: [PATCH] GregMiscellaneous: zzogl-pg: * Fix my previous stupid limit... git-svn-id: http://pcsx2.googlecode.com/svn/branches/GregMiscellaneous@3802 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/zzogl-pg/opengl/targets.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/zzogl-pg/opengl/targets.cpp b/plugins/zzogl-pg/opengl/targets.cpp index 83268278c..14657652c 100644 --- a/plugins/zzogl-pg/opengl/targets.cpp +++ b/plugins/zzogl-pg/opengl/targets.cpp @@ -2928,11 +2928,10 @@ inline void Resolve_32_Bit(const void* psrc, int fbp, int fbw, int fbh, const in // Start the src array at the end to reduce testing in loop u32 raw_size = RH(Pitch(fbw))/sizeof(u32); - u32* src = (u32*)(psrc) + maxfbh*raw_size; + u32* src = (u32*)(psrc) + (maxfbh-1)*raw_size; - for(int i = maxfbh; i > 0; --i) { - src -= raw_size; - for(int j = fbw; j > 0; --j) { + for(int i = maxfbh-1; i >= 0; --i) { + for(int j = fbw-1; j >= 0; --j) { Tdst dsrc = (Tdst)convfn(src[RW(j)]); // They are 3 methods to call the functions // macro (compact, inline) but need a nice psm ; swich (inline) ; function pointer (compact) @@ -2970,6 +2969,7 @@ inline void Resolve_32_Bit(const void* psrc, int fbp, int fbw, int fbh, const in } *dst = (dsrc & mask) | (*dst & imask); } + src -= raw_size; } }