summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/OpcodeDecoder.cpp
diff options
context:
space:
mode:
authormagumagu <magumagu9@gmail.com>2014-05-08 15:43:41 -0700
committermagumagu <magumagu9@gmail.com>2014-05-08 15:49:19 -0700
commit369c0c4ce20859448a82c509661cbfe90dcc8d44 (patch)
tree83fad657f9bb6bdaa71ef5fd9b6eedd41b0493f3 /Source/Core/VideoBackends/Software/OpcodeDecoder.cpp
parentb4e1ac5f080d630d33842822b8e3470d2c62abc3 (diff)
Opcode decoding: 0xC0 isn't a valid command.
Fix our opcode decoders to handle this appropriately.
Diffstat (limited to 'Source/Core/VideoBackends/Software/OpcodeDecoder.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/OpcodeDecoder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Software/OpcodeDecoder.cpp b/Source/Core/VideoBackends/Software/OpcodeDecoder.cpp
index f9d01b7de5..52bd632e15 100644
--- a/Source/Core/VideoBackends/Software/OpcodeDecoder.cpp
+++ b/Source/Core/VideoBackends/Software/OpcodeDecoder.cpp
@@ -201,7 +201,7 @@ void DecodeStandard(u32 bufferSize)
// draw primitives
default:
- if (Cmd & 0x80)
+ if ((Cmd & 0xC0) == 0x80)
{
u8 vatIndex = Cmd & GX_VAT_MASK;
u8 primitiveType = (Cmd & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT;
@@ -283,7 +283,7 @@ bool CommandRunnable(u32 iBufferSize)
// draw primitives
default:
- if (Cmd & 0x80)
+ if ((Cmd & 0xC0) == 0x80)
minSize = 3;
break;
}