Debugger: Add some missing memory locks.

We can restart memory when loading save states, so we need this even while
we've got startup/shutdown locked.
This commit is contained in:
Unknown W. Brackets committed 2018-06-08 06:59:18 -07:00
1 parent b2cc4a0965
commit 8598fc9912
4 files changed
+13 -1

No files matched your search

+5
View File
@@ -174,6 +174,8 @@ CtrlMemView *CtrlMemView::getFrom(HWND hwnd)
void CtrlMemView::onPaint(WPARAM wParam, LPARAM lParam)
{
auto memLock = Memory::Lock();
// draw to a bitmap for double buffering
PAINTSTRUCT ps;
HDC actualHdc = BeginPaint(wnd, &ps);
@@ -445,6 +447,7 @@ void CtrlMemView::onMouseUp(WPARAM wParam, LPARAM lParam, int button)
case ID_MEMVIEW_COPYVALUE_8:
{
auto memLock = Memory::Lock();
char temp[24];
// it's admittedly not really useful like this
@@ -462,6 +465,7 @@ void CtrlMemView::onMouseUp(WPARAM wParam, LPARAM lParam, int button)
case ID_MEMVIEW_COPYVALUE_16:
{
auto memLock = Memory::Lock();
char temp[24];
sprintf(temp,"%04X",Memory::IsValidAddress(curAddress) ? Memory::Read_U16(curAddress) : 0xFFFF);
@@ -471,6 +475,7 @@ void CtrlMemView::onMouseUp(WPARAM wParam, LPARAM lParam, int button)
case ID_MEMVIEW_COPYVALUE_32:
{
auto memLock = Memory::Lock();
char temp[24];
sprintf(temp,"%08X",Memory::IsValidAddress(curAddress) ? Memory::Read_U32(curAddress) : 0xFFFFFFFF);