UI: Use a UIState for exceptions.

This makes it so we can enable Stop/Reset/etc. during them in the menus.
This commit is contained in:
Unknown W. Brackets committed 2021-08-08 23:40:41 -07:00
1 parent 32c7ff8436
commit 75eeb55617
5 files changed
+11 -7

No files matched your search

+3 -2
View File
@@ -791,9 +791,10 @@ void CDisasm::SavePosition()
void CDisasm::SetDebugMode(bool _bDebug, bool switchPC)
{
HWND hDlg = m_hDlg;
bool ingame = (GetUIState() == UISTATE_INGAME || GetUIState() == UISTATE_EXCEPTION) && PSP_IsInited();
// Update Dialog Windows
if (_bDebug && GetUIState() == UISTATE_INGAME && PSP_IsInited())
if (_bDebug && ingame)
{
Core_WaitInactive(TEMP_BREAKPOINT_WAIT_MS);
breakpointList->reloadBreakpoints();
@@ -827,7 +828,7 @@ void CDisasm::SetDebugMode(bool _bDebug, bool switchPC)
{
updateThreadLabel(true);
if (GetUIState() == UISTATE_INGAME && PSP_IsInited())
if (ingame)
{
SetDlgItemText(m_hDlg, IDC_STOPGO, L"Break");
EnableWindow(GetDlgItem(hDlg, IDC_STOPGO), TRUE);