diff --git a/pcsx2/gui/Debugger/CtrlRegisterList.cpp b/pcsx2/gui/Debugger/CtrlRegisterList.cpp index 60adfd24d6..cc6a9b8102 100644 --- a/pcsx2/gui/Debugger/CtrlRegisterList.cpp +++ b/pcsx2/gui/Debugger/CtrlRegisterList.cpp @@ -309,95 +309,96 @@ void CtrlRegisterList::OnDraw(wxDC& dc) break; } - [[fallthrough]]; // If we fallthrough, display VU0f as hexadecimal } else { dc.DrawText(cpu->getRegisterString(category, i), x, y + 2); 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; - - if (resolvePointerStrings && cpu->isAlive()) + const char* strval = cpu->stringFromPointer(value._u32[0]); + if (strval) { - const char* strval = cpu->stringFromPointer(value._u32[0]); - if (strval) - { - static wxColor clr = wxColor(0xFF228822); - dc.SetTextForeground(clr); - dc.DrawText(wxString(strval), width - (32 * charWidth + 12), y + 2); - startIndex = 0; - } + static wxColor clr = wxColor(0xFF228822); + 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(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(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); - else - dc.SetTextForeground(colorUnchanged); - - drawU32Text(dc, value._u32[j], x, y + 2); - x += charWidth * 8 + 2; + dc.SetTextForeground(colorChanged); + dc.DrawText(L"+", x - charWidth, y + 2); } - - break; } - case 32: + + for (int j = startIndex; j >= 0; j--) { - if (changed.changed[0]) + if (changed.changed[j]) dc.SetTextForeground(colorChanged); else dc.SetTextForeground(colorUnchanged); - drawU32Text(dc, value._u32[0], x, y + 2); - break; + 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; } - 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; } } }