mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 01:59:34 +01:00
D3D11 CopyFBToMemory: Clamp rect to fb size. Last-minute style fix, should really debug where the bad parameters came from.
Affects MGS Peace Walker intro
This commit is contained in:
1 parent
3f7602227c
commit
a3bbe87914
1 file changed
+10
@@ -1365,6 +1365,16 @@ bool D3D11DrawContext::CopyFramebufferToMemorySync(Framebuffer *src, int channel
|
||||
assert(fb->colorFormat == DXGI_FORMAT_R8G8B8A8_UNORM);
|
||||
}
|
||||
|
||||
// TODO: Figure out where the badness really comes from.
|
||||
if (bx + bw > fb->width) {
|
||||
bw -= (bx + bw) - fb->width;
|
||||
}
|
||||
if (by + bh > fb->height) {
|
||||
bh -= (by + bh) - fb->height;
|
||||
}
|
||||
if (bh <= 0 || bw <= 0)
|
||||
return true;
|
||||
|
||||
bool useGlobalPacktex = (bx + bw <= 512 && by + bh <= 512) && channelBits == FB_COLOR_BIT;
|
||||
|
||||
ID3D11Texture2D *packTex;
|
||||
|
||||
Reference in new issue
Block a user