summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/XFStructs.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2012-05-18 23:27:02 +0200
committerPierre Bourdon <delroth@gmail.com>2012-05-18 23:27:02 +0200
commitb8d4d013f6aa641d823a4a33e1cb09deb06f7f7a (patch)
tree1c81a96811085dce123b30f6ed2f2226d36c4435 /Source/Core/VideoCommon/Src/XFStructs.cpp
parent5a77cae2e3434fa5cbb3710f183328e36620fa5f (diff)
Compute the comparison size properly (transferSize is in u32, not in u8)
Diffstat (limited to 'Source/Core/VideoCommon/Src/XFStructs.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/XFStructs.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Src/XFStructs.cpp b/Source/Core/VideoCommon/Src/XFStructs.cpp
index d879c83652..b75e7188af 100644
--- a/Source/Core/VideoCommon/Src/XFStructs.cpp
+++ b/Source/Core/VideoCommon/Src/XFStructs.cpp
@@ -122,7 +122,7 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
case XFMEM_SETVIEWPORT+4:
case XFMEM_SETVIEWPORT+5:
{
- u8 size = std::min(transferSize, 6 * 4);
+ u8 size = std::min(transferSize * 4, 6 * 4);
if (memcmp((u32*)&xfregs + (address - 0x1000), pData + dataIndex, size))
{
VertexManager::Flush();
@@ -142,7 +142,7 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
case XFMEM_SETPROJECTION+5:
case XFMEM_SETPROJECTION+6:
{
- u8 size = std::min(transferSize, 7 * 4);
+ u8 size = std::min(transferSize * 4, 7 * 4);
if (memcmp((u32*)&xfregs + (address - 0x1000), pData + dataIndex, size))
{
VertexManager::Flush();
@@ -167,7 +167,7 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
case XFMEM_SETTEXMTXINFO+6:
case XFMEM_SETTEXMTXINFO+7:
{
- u8 size = std::min(transferSize, 8 * 4);
+ u8 size = std::min(transferSize * 4, 8 * 4);
if (memcmp((u32*)&xfregs + (address - 0x1000), pData + dataIndex, size))
{
VertexManager::Flush();
@@ -186,7 +186,7 @@ void XFRegWritten(int transferSize, u32 baseAddress, u32 *pData)
case XFMEM_SETPOSMTXINFO+6:
case XFMEM_SETPOSMTXINFO+7:
{
- u8 size = std::min(transferSize, 8 * 4);
+ u8 size = std::min(transferSize * 4, 8 * 4);
if (memcmp((u32*)&xfregs + (address - 0x1000), pData + dataIndex, size))
{
VertexManager::Flush();