GE Debugger: Correct cond break removal warnings.

Oops, they were just always confirming.
This commit is contained in:
Unknown W. Brackets 2022-09-10 08:52:50 -07:00
parent 0fe7589a9d
commit c200aa6f4b
2 changed files with 7 additions and 5 deletions

View File

@ -910,7 +910,7 @@ void CtrlStateValues::OnDoubleClick(int row, int column) {
if (column == STATEVALUES_COL_BREAKPOINT) {
bool proceed = true;
if (IsCmdBreakpoint(info.cmd)) {
if (GetCmdBreakpointCond(info.cmd, nullptr)) {
int ret = MessageBox(GetHandle(), L"This breakpoint has a custom condition.\nDo you want to remove it?", L"Confirmation", MB_YESNO);
proceed = ret == IDYES;
}
@ -993,7 +993,7 @@ void CtrlStateValues::OnRightClick(int row, int column, const POINT &point) {
{
case ID_DISASM_TOGGLEBREAKPOINT: {
bool proceed = true;
if (IsCmdBreakpoint(info.cmd)) {
if (GetCmdBreakpointCond(info.cmd, nullptr)) {
int ret = MessageBox(GetHandle(), L"This breakpoint has a custom condition.\nDo you want to remove it?", L"Confirmation", MB_YESNO);
proceed = ret == IDYES;
}

View File

@ -571,9 +571,11 @@ void CtrlMatrixList::ToggleBreakpoint(int row) {
if (state) {
GPUBreakpoints::AddCmdBreakpoint(info->cmd);
} else {
int ret = MessageBox(GetHandle(), L"This breakpoint has a custom condition.\nDo you want to remove it?", L"Confirmation", MB_YESNO);
if (ret != IDYES)
return;
if (GPUBreakpoints::GetCmdBreakpointCond(info->cmd, nullptr)) {
int ret = MessageBox(GetHandle(), L"This breakpoint has a custom condition.\nDo you want to remove it?", L"Confirmation", MB_YESNO);
if (ret != IDYES)
return;
}
GPUBreakpoints::RemoveCmdBreakpoint(info->cmd);
}