diff options
| author | booto <remornicus@gmail.com> | 2015-09-03 03:57:03 +0800 |
|---|---|---|
| committer | booto <remornicus@gmail.com> | 2015-09-03 03:57:03 +0800 |
| commit | 5a32c3fba49cbe62f1f6447d681ac6717c032f99 (patch) | |
| tree | befb566023fa01c19f5dc0122852be6ff0bd7275 /Source/Core/VideoCommon/BPStructs.cpp | |
| parent | 3b65c4070cc619aeb5aed803eeeb5a59b0057ce0 (diff) | |
VideoCommon: xfb height calculation adjusted
Baten Kaitos allocates its XFBs from a tagged heap
structure. With the old calculation, too many lines
were being written so the tag of the allocation
after the XFB was being corrupted. Fixes crash
mentioned in this comment:
https://code.google.com/p/dolphin-emu/issues/detail?id=7734#c6
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/BPStructs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index b4d3cce959..cacb005143 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -241,7 +241,7 @@ static void BPWritten(const BPCmd& bp) else yScale = (float)bpmem.dispcopyyscale / 256.0f; - float num_xfb_lines = ((bpmem.copyTexSrcWH.y + 1.0f) * yScale); + float num_xfb_lines = 1.0f + bpmem.copyTexSrcWH.y * yScale; u32 height = static_cast<u32>(num_xfb_lines); if (height > MAX_XFB_HEIGHT) |
