mirror of https://github.com/PCSX2/pcsx2.git
Debugger: CtrlRegisterList: Fix warning and screw up
This commit is contained in:
parent
19072b6595
commit
2175814acf
|
@ -309,95 +309,96 @@ void CtrlRegisterList::OnDraw(wxDC& dc)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
[[fallthrough]]; // If we fallthrough, display VU0f as hexadecimal
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dc.DrawText(cpu->getRegisterString(category, i), x, y + 2);
|
dc.DrawText(cpu->getRegisterString(category, i), x, y + 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DebugInterface::NORMAL: // display them in 32 bit parts
|
}
|
||||||
switch (registerBits)
|
case DebugInterface::NORMAL: // display them in 32 bit parts
|
||||||
|
{
|
||||||
|
switch (registerBits)
|
||||||
|
{
|
||||||
|
case 128:
|
||||||
{
|
{
|
||||||
case 128:
|
int startIndex = 3;
|
||||||
|
|
||||||
|
if (resolvePointerStrings && cpu->isAlive())
|
||||||
{
|
{
|
||||||
int startIndex = 3;
|
const char* strval = cpu->stringFromPointer(value._u32[0]);
|
||||||
|
if (strval)
|
||||||
if (resolvePointerStrings && cpu->isAlive())
|
|
||||||
{
|
{
|
||||||
const char* strval = cpu->stringFromPointer(value._u32[0]);
|
static wxColor clr = wxColor(0xFF228822);
|
||||||
if (strval)
|
dc.SetTextForeground(clr);
|
||||||
{
|
dc.DrawText(wxString(strval), width - (32 * charWidth + 12), y + 2);
|
||||||
static wxColor clr = wxColor(0xFF228822);
|
startIndex = 0;
|
||||||
dc.SetTextForeground(clr);
|
|
||||||
dc.DrawText(wxString(strval), width - (32 * charWidth + 12), y + 2);
|
|
||||||
startIndex = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const int actualX = width - 4 - (startIndex + 1) * (8 * charWidth + 2);
|
|
||||||
x = std::max<int>(actualX, x);
|
|
||||||
|
|
||||||
if (startIndex != 3)
|
|
||||||
{
|
|
||||||
bool c = false;
|
|
||||||
for (int i = 3; i > startIndex; i--)
|
|
||||||
c = c || changed.changed[i];
|
|
||||||
|
|
||||||
if (c)
|
|
||||||
{
|
|
||||||
dc.SetTextForeground(colorChanged);
|
|
||||||
dc.DrawText(L"+", x - charWidth, y + 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int j = startIndex; j >= 0; j--)
|
|
||||||
{
|
|
||||||
if (changed.changed[j])
|
|
||||||
dc.SetTextForeground(colorChanged);
|
|
||||||
else
|
|
||||||
dc.SetTextForeground(colorUnchanged);
|
|
||||||
|
|
||||||
drawU32Text(dc, value._u32[j], x, y + 2);
|
|
||||||
|
|
||||||
// Only draw the VU0f titles when we are drawing the first row and are on the VU0f category
|
|
||||||
if (category == EECAT_VU0F && i == startRow)
|
|
||||||
{
|
|
||||||
dc.SetTextForeground(colorNormal);
|
|
||||||
dc.DrawText(vu0fTitles[vu0fTitleCur++], x + (charWidth * 2.5) , rowHeight + 2);
|
|
||||||
}
|
|
||||||
x += charWidth * 8 + 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case 64:
|
|
||||||
|
const int actualX = width - 4 - (startIndex + 1) * (8 * charWidth + 2);
|
||||||
|
x = std::max<int>(actualX, x);
|
||||||
|
|
||||||
|
if (startIndex != 3)
|
||||||
{
|
{
|
||||||
for (int j = 1; j >= 0; j--)
|
bool c = false;
|
||||||
|
for (int i = 3; i > startIndex; i--)
|
||||||
|
c = c || changed.changed[i];
|
||||||
|
|
||||||
|
if (c)
|
||||||
{
|
{
|
||||||
if (changed.changed[j])
|
dc.SetTextForeground(colorChanged);
|
||||||
dc.SetTextForeground(colorChanged);
|
dc.DrawText(L"+", x - charWidth, y + 2);
|
||||||
else
|
|
||||||
dc.SetTextForeground(colorUnchanged);
|
|
||||||
|
|
||||||
drawU32Text(dc, value._u32[j], x, y + 2);
|
|
||||||
x += charWidth * 8 + 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case 32:
|
|
||||||
|
for (int j = startIndex; j >= 0; j--)
|
||||||
{
|
{
|
||||||
if (changed.changed[0])
|
if (changed.changed[j])
|
||||||
dc.SetTextForeground(colorChanged);
|
dc.SetTextForeground(colorChanged);
|
||||||
else
|
else
|
||||||
dc.SetTextForeground(colorUnchanged);
|
dc.SetTextForeground(colorUnchanged);
|
||||||
|
|
||||||
drawU32Text(dc, value._u32[0], x, y + 2);
|
drawU32Text(dc, value._u32[j], x, y + 2);
|
||||||
break;
|
|
||||||
|
// Only draw the VU0f titles when we are drawing the first row and are on the VU0f category
|
||||||
|
if (category == EECAT_VU0F && i == startRow)
|
||||||
|
{
|
||||||
|
dc.SetTextForeground(colorNormal);
|
||||||
|
dc.DrawText(vu0fTitles[vu0fTitleCur++], x + (charWidth * 2.5), rowHeight + 2);
|
||||||
|
}
|
||||||
|
x += charWidth * 8 + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
case 64:
|
||||||
|
{
|
||||||
|
for (int j = 1; j >= 0; j--)
|
||||||
|
{
|
||||||
|
if (changed.changed[j])
|
||||||
|
dc.SetTextForeground(colorChanged);
|
||||||
|
else
|
||||||
|
dc.SetTextForeground(colorUnchanged);
|
||||||
|
|
||||||
|
drawU32Text(dc, value._u32[j], x, y + 2);
|
||||||
|
x += charWidth * 8 + 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 32:
|
||||||
|
{
|
||||||
|
if (changed.changed[0])
|
||||||
|
dc.SetTextForeground(colorChanged);
|
||||||
|
else
|
||||||
|
dc.SetTextForeground(colorUnchanged);
|
||||||
|
|
||||||
|
drawU32Text(dc, value._u32[0], x, y + 2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue