Skip to content

Commit

Permalink
Issue #654 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ClusterM committed Oct 2, 2023
1 parent e0138e5 commit 33aca22
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions src/drivers/win/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1963,6 +1963,7 @@ INT_PTR CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
//these messages get handled at any time
switch(uMsg)
{

case WM_INITDIALOG:
{
char str[256] = { 0 };
Expand Down Expand Up @@ -2157,22 +2158,16 @@ INT_PTR CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
break;
case IDC_DEBUGGER_CYCLES_EXCEED:
{
if (HIWORD(wParam) == EN_CHANGE)
{
char str[16];
GetDlgItemText(hwndDlg, IDC_DEBUGGER_CYCLES_EXCEED, str, 16);
break_cycles_limit = strtoul(str, NULL, 10);
}
char str[16];
GetDlgItemText(hwndDlg, IDC_DEBUGGER_CYCLES_EXCEED, str, 16);
break_cycles_limit = strtoul(str, NULL, 10);
break;
}
case IDC_DEBUGGER_INSTRUCTIONS_EXCEED:
{
if (HIWORD(wParam) == EN_CHANGE)
{
char str[16];
GetDlgItemText(hwndDlg, IDC_DEBUGGER_INSTRUCTIONS_EXCEED, str, 16);
break_instructions_limit = strtoul(str, NULL, 10);
}
char str[16];
GetDlgItemText(hwndDlg, IDC_DEBUGGER_INSTRUCTIONS_EXCEED, str, 16);
break_instructions_limit = strtoul(str, NULL, 10);
break;
}
case ID_DEBUGGER_DEFCOLOR:
Expand Down Expand Up @@ -2218,6 +2213,26 @@ INT_PTR CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
break;
}
}
case EN_CHANGE:
case EN_UPDATE:
switch (LOWORD(wParam))
{
case IDC_DEBUGGER_CYCLES_EXCEED:
{
char str[16];
GetDlgItemText(hwndDlg, IDC_DEBUGGER_CYCLES_EXCEED, str, 16);
break_cycles_limit = strtoul(str, NULL, 10);
break;
}
case IDC_DEBUGGER_INSTRUCTIONS_EXCEED:
{
char str[16];
GetDlgItemText(hwndDlg, IDC_DEBUGGER_INSTRUCTIONS_EXCEED, str, 16);
break_instructions_limit = strtoul(str, NULL, 10);
break;
}
}
break;
}
}
}
Expand Down

0 comments on commit 33aca22

Please sign in to comment.