summaryrefslogtreecommitdiff
path: root/Source/Core/DebuggerWX/Src/RegisterView.cpp
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2009-01-20 19:41:45 +0000
committerhrydgard <hrydgard@gmail.com>2009-01-20 19:41:45 +0000
commite6d78d344732bb7109012a0169d4e416d1b1c9d6 (patch)
tree43f1879c95ccfa1eb830f84bc0719d28f6b981e8 /Source/Core/DebuggerWX/Src/RegisterView.cpp
parent8cdbaa27144516ee9093bee02198688aa246604f (diff)
fix red coloring of fp regs in registerview
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1964 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DebuggerWX/Src/RegisterView.cpp')
-rw-r--r--Source/Core/DebuggerWX/Src/RegisterView.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/Source/Core/DebuggerWX/Src/RegisterView.cpp b/Source/Core/DebuggerWX/Src/RegisterView.cpp
index 113bf0133e..fac3287702 100644
--- a/Source/Core/DebuggerWX/Src/RegisterView.cpp
+++ b/Source/Core/DebuggerWX/Src/RegisterView.cpp
@@ -93,13 +93,25 @@ wxGridCellAttr *CRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKind)
attr->SetBackgroundColour(wxColour(wxT("#FFFFFF")));
attr->SetFont(DefaultFont);
- attr->SetAlignment(col & 1 ? wxALIGN_CENTER : wxALIGN_LEFT, wxALIGN_CENTER);
- if (col == 0)
- attr->SetTextColour(wxColour(wxT("#000000")));
- else
- attr->SetTextColour(m_CachedRegHasChanged[row] ? wxColor(wxT("#FF0000")) : wxColor(wxT("#000000")));
+ switch (col) {
+ case 1:
+ case 3:
+ case 4:
+ attr->SetAlignment(wxALIGN_CENTER, wxALIGN_CENTER);
+ break;
+ default:
+ attr->SetAlignment(wxALIGN_LEFT, wxALIGN_CENTER);
+ break;
+ }
+ bool red = false;
+ switch (col) {
+ case 1: red = row < 32 ? m_CachedRegHasChanged[row] : m_CachedSpecialRegHasChanged[row-32]; break;
+ case 3:
+ case 4: red = row < 32 ? m_CachedFRegHasChanged[row][col-3] : false; break;
+ }
+ attr->SetTextColour(red ? wxColor(wxT("#FF0000")) : wxColor(wxT("#000000")));
attr->IncRef();
return attr;
}