diff --git a/Windows/Debugger/Debugger_Disasm.cpp b/Windows/Debugger/Debugger_Disasm.cpp index 07db32729..f3f419b39 100644 --- a/Windows/Debugger/Debugger_Disasm.cpp +++ b/Windows/Debugger/Debugger_Disasm.cpp @@ -451,15 +451,27 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) }; break; - case IDC_GO: + case IDC_STOPGO: { - lastTicks = CoreTiming::GetTicks(); + if (!Core_IsStepping()) // stop + { + ptr->setDontRedraw(false); + SetDebugMode(true); + Core_EnableStepping(true); + _dbg_update_(); + Sleep(1); //let cpu catch up + ptr->gotoPC(); + UpdateDialog(); + vfpudlg->Update(); + } else { // go + lastTicks = CoreTiming::GetTicks(); - // If the current PC is on a breakpoint, the user doesn't want to do nothing. - CBreakPoints::SetSkipFirst(currentMIPS->pc); + // If the current PC is on a breakpoint, the user doesn't want to do nothing. + CBreakPoints::SetSkipFirst(currentMIPS->pc); - SetDebugMode(false); - Core_EnableStepping(false); + SetDebugMode(false); + Core_EnableStepping(false); + } } break; @@ -487,19 +499,6 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) } break; - case IDC_STOP: - { - ptr->setDontRedraw(false); - SetDebugMode(true); - Core_EnableStepping(true); - _dbg_update_(); - Sleep(1); //let cpu catch up - ptr->gotoPC(); - UpdateDialog(); - vfpudlg->Update(); - } - break; - case IDC_SKIP: { cpu->SetPC(cpu->GetPC() + cpu->getInstructionSize(0)); @@ -750,11 +749,10 @@ void CDisasm::SetDebugMode(bool _bDebug) stackTraceView->loadStackTrace(); updateThreadLabel(false); - EnableWindow( GetDlgItem(hDlg, IDC_GO), TRUE); + SetDlgItemText(m_hDlg, IDC_STOPGO, "Go"); EnableWindow( GetDlgItem(hDlg, IDC_STEP), TRUE); EnableWindow( GetDlgItem(hDlg, IDC_STEPOVER), TRUE); EnableWindow( GetDlgItem(hDlg, IDC_STEPHLE), TRUE); - EnableWindow( GetDlgItem(hDlg, IDC_STOP), FALSE); EnableWindow( GetDlgItem(hDlg, IDC_SKIP), TRUE); CtrlDisAsmView *ptr = CtrlDisAsmView::getFrom(GetDlgItem(m_hDlg,IDC_DISASMVIEW)); ptr->setDontRedraw(false); @@ -770,12 +768,11 @@ void CDisasm::SetDebugMode(bool _bDebug) else { updateThreadLabel(true); - - EnableWindow( GetDlgItem(hDlg, IDC_GO), FALSE); + + SetDlgItemText(m_hDlg, IDC_STOPGO, "Stop"); EnableWindow( GetDlgItem(hDlg, IDC_STEP), FALSE); EnableWindow( GetDlgItem(hDlg, IDC_STEPOVER), FALSE); EnableWindow( GetDlgItem(hDlg, IDC_STEPHLE), FALSE); - EnableWindow( GetDlgItem(hDlg, IDC_STOP), TRUE); EnableWindow( GetDlgItem(hDlg, IDC_SKIP), FALSE); CtrlRegisterList *reglist = CtrlRegisterList::getFrom(GetDlgItem(m_hDlg,IDC_REGLIST)); reglist->redraw(); diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 9d29aaf52..53ca832e3 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -677,16 +677,16 @@ namespace MainWindow if (globalUIState == UISTATE_PAUSEMENU) { NativeMessageReceived("run", ""); if (disasmWindow[0]) - SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_GO, 0); + SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_STOPGO, 0); } else if (Core_IsStepping()) { // It is paused, then continue to run. if (disasmWindow[0]) - SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_GO, 0); + SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_STOPGO, 0); else Core_EnableStepping(false); } else { if (disasmWindow[0]) - SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_STOP, 0); + SendMessage(disasmWindow[0]->GetDlgHandle(), WM_COMMAND, IDC_STOPGO, 0); else Core_EnableStepping(true); } diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index 586e4d0a3..b3b3f2038 100644 Binary files a/Windows/ppsspp.rc and b/Windows/ppsspp.rc differ diff --git a/Windows/resource.h b/Windows/resource.h index 8eb3e5243..b35a9ffd9 100644 Binary files a/Windows/resource.h and b/Windows/resource.h differ