diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-04-25 16:55:19 +0200 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-04-25 16:55:19 +0200 |
commit | d9afcc37b8b11e33a7ff4da1dc3f0d287cef8755 (patch) | |
tree | bc86dbf73a6f4f442cbbb99f76b07f58642ff51c | |
parent | 29938b566ac6137a6b6a12d2721502603678d999 (diff) |
fix display capture blending bugs. fancypants motion blur filters shouldn't look like acid trips anymore.
-rw-r--r-- | src/GPU2D.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp index 2ff9413..ce8714d 100644 --- a/src/GPU2D.cpp +++ b/src/GPU2D.cpp @@ -608,8 +608,8 @@ void GPU2D::DoCapture(u32 line, u32 width, u32* src) case 2: // sources A+B case 3: { - u32 eva = DispCnt & 0x1F; - u32 evb = (DispCnt >> 8) & 0x1F; + u32 eva = CaptureCnt & 0x1F; + u32 evb = (CaptureCnt >> 8) & 0x1F; // checkme if (eva > 16) eva = 16; @@ -640,6 +640,10 @@ void GPU2D::DoCapture(u32 line, u32 width, u32* src) u32 bD = ((bA * aA * eva) + (bB * aB * evb)) >> 4; u32 aD = (eva>0 ? aA : 0) | (evb>0 ? aB : 0); + if (rD > 0x1F) rD = 0x1F; + if (gD > 0x1F) gD = 0x1F; + if (bD > 0x1F) bD = 0x1F; + dst[dstaddr] = rD | (gD << 5) | (bD << 10) | (aD << 15); srcBaddr = (srcBaddr + 1) & 0xFFFF; dstaddr = (dstaddr + 1) & 0xFFFF; |