mirror of https://github.com/PCSX2/pcsx2.git
WX: Backport Resamplebox patch to fix GSDump previews in vs2022
This commit is contained in:
parent
e359cc5da9
commit
2ddc7897e0
|
@ -627,7 +627,8 @@ wxImage wxImage::ResampleBox(int width, int height) const
|
|||
const BoxPrecalc& hPrecalc = hPrecalcs[x];
|
||||
|
||||
// Box of pixels to average
|
||||
averaged_pixels = 0;
|
||||
averaged_pixels = (vPrecalc.boxEnd - vPrecalc.boxStart + 1)
|
||||
*(hPrecalc.boxEnd - hPrecalc.boxStart + 1);
|
||||
sum_r = sum_g = sum_b = sum_a = 0.0;
|
||||
|
||||
for ( int j = vPrecalc.boxStart; j <= vPrecalc.boxEnd; ++j )
|
||||
|
@ -642,8 +643,6 @@ wxImage wxImage::ResampleBox(int width, int height) const
|
|||
sum_b += src_data[src_pixel_index * 3 + 2];
|
||||
if ( src_alpha )
|
||||
sum_a += src_alpha[src_pixel_index];
|
||||
|
||||
averaged_pixels++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue