Don't show the op twice in the GE debugger.

This commit is contained in:
Unknown W. Brackets 2015-02-01 01:21:04 -08:00
parent 32573ce121
commit e4a24efda3
2 changed files with 3 additions and 6 deletions

View File

@ -570,7 +570,7 @@ void GPUCommon::SlowRunLoop(DisplayList &list)
prev = 0;
}
GeDisassembleOp(list.pc, op, prev, temp, 256);
NOTICE_LOG(G3D, "%s", temp);
NOTICE_LOG(G3D, "%08x: %s", op, temp);
}
gstate.cmdmem[cmd] = op;

View File

@ -81,13 +81,10 @@ void GeDescribeVertexType(u32 op, char *buffer, int len) {
w[-2] = '\0';
}
void GeDisassembleOp(u32 pc, u32 op, u32 prev, char *origbuf, int bufsize) {
void GeDisassembleOp(u32 pc, u32 op, u32 prev, char *buffer, int bufsize) {
u32 cmd = op >> 24;
u32 data = op & 0xFFFFFF;
char *buffer = origbuf + snprintf(origbuf, bufsize, "%08x: ", op);
bufsize -= (int)(buffer - origbuf);
// Handle control and drawing commands here directly. The others we delegate.
switch (cmd)
{
@ -254,7 +251,7 @@ void GeDisassembleOp(u32 pc, u32 op, u32 prev, char *origbuf, int bufsize) {
case GE_CMD_VERTEXTYPE:
{
int len = snprintf(buffer, bufsize, "SetVertexType: ");
GeDescribeVertexType(op, buffer + len, 256 - len);
GeDescribeVertexType(op, buffer + len, bufsize - len);
}
break;