Debugger: Periodically refresh watches to be safe.

This commit is contained in:
Unknown W. Brackets 2023-04-09 00:52:03 -07:00
parent c0fc2e65e0
commit 99bdb4f18a

View file

@ -816,10 +816,15 @@ void CtrlModuleList::loadModules()
Update();
}
// In case you modify things in the memory view.
static constexpr UINT_PTR IDT_CHECK_REFRESH = 0xC0DE0044;
CtrlWatchList::CtrlWatchList(HWND hwnd, DebugInterface *cpu)
: GenericListControl(hwnd, watchListDef), cpu_(cpu) {
SetSendInvalidRows(true);
Update();
SetTimer(GetHandle(), IDT_CHECK_REFRESH, 1000U, nullptr);
}
void CtrlWatchList::RefreshValues() {
@ -870,6 +875,12 @@ bool CtrlWatchList::WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESUL
}
}
break;
case WM_TIMER:
if (wParam == IDT_CHECK_REFRESH) {
RefreshValues();
return true;
}
break;
}
return false;