summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2016-10-08 10:40:14 +0200
committerGitHub <noreply@github.com>2016-10-08 10:40:14 +0200
commit1a2d71cb58afcafbfca4f8457c4f0c2e22d8d2a3 (patch)
treef22fabc9213d9c1ba6088f607b485ccc83e87cdc /Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp
parent4ba1100f3191c80e58f89c78d1e8965e126da8f3 (diff)
parent2ba0d6eb77eb1542a68d5a3998531578b4782b25 (diff)
Merge pull request #4310 from lioncash/dsptable
DSPRegisterView: Minor changes
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp b/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp
index 4f0d6fb2d3..65fdc2b9ca 100644
--- a/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp
+++ b/Source/Core/DolphinWX/Debugger/DSPRegisterView.cpp
@@ -13,7 +13,7 @@
wxString CDSPRegTable::GetValue(int row, int col)
{
- if (row < 32) // 32 "normal" regs
+ if (row < GetNumberRows())
{
switch (col)
{
@@ -41,10 +41,12 @@ void CDSPRegTable::UpdateCachedRegs()
m_CachedCounter = g_dsp.step_counter;
- for (int i = 0; i < 32; ++i)
+ for (size_t i = 0; i < m_CachedRegs.size(); ++i)
{
- m_CachedRegHasChanged[i] = (m_CachedRegs[i] != DSPCore_ReadRegister(i));
- m_CachedRegs[i] = DSPCore_ReadRegister(i);
+ const u16 value = DSPCore_ReadRegister(i);
+
+ m_CachedRegHasChanged[i] = m_CachedRegs[i] != value;
+ m_CachedRegs[i] = value;
}
}