diff --git a/src/drivers/win/debugger.cpp b/src/drivers/win/debugger.cpp index 6da768c4c..30a2cd1b2 100644 --- a/src/drivers/win/debugger.cpp +++ b/src/drivers/win/debugger.cpp @@ -1649,6 +1649,7 @@ inline void UpdateOptionsPopup(HMENU optionsPopup) CheckMenuItem(optionsPopup, ID_DEBUGGER_AUTO_OPEN, CheckedFlag(debuggerAutoload)); CheckMenuItem(optionsPopup, ID_DEBUGGER_IDA_FONT, CheckedFlag(debuggerIDAFont)); CheckMenuItem(optionsPopup, ID_DEBUGGER_SHOW_ROM_OFFSETS, CheckedFlag(debuggerDisplayROMoffsets)); + CheckMenuItem(optionsPopup, ID_DEBUGGER_BREAK_BAD_OPCODES, CheckedFlag(FCEUI_Debugger().badopbreak)); } inline void UpdateSymbolsPopup(HMENU symbolsPopup) @@ -1945,6 +1946,9 @@ void DebuggerBnClicked(HWND hwndDlg, uint16 btnId, HWND hwndBtn) debuggerDisplayROMoffsets ^= 1; UpdateDebugger(false); break; + case ID_DEBUGGER_BREAK_BAD_OPCODES: + FCEUI_Debugger().badopbreak ^= 1; + break; case ID_DEBUGGER_RESTORE_SIZE: RestoreSize(hwndDlg); break; @@ -2121,6 +2125,7 @@ void DebuggerBnClicked(HWND hwndDlg, uint16 btnId, HWND hwndBtn) } break; } + // TODO: delete/merge with ID_DEBUGGER_BREAK_BAD_OPCODES case IDC_DEBUGGER_BREAK_ON_BAD_OP: //Break on bad opcode FCEUI_Debugger().badopbreak ^= 1; break; diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index 99b8e2c5c..9197b9a3a 100644 --- a/src/drivers/win/res.rc +++ b/src/drivers/win/res.rc @@ -3047,6 +3047,8 @@ BEGIN MENUITEM "Auto Open on ROM Load", ID_DEBUGGER_AUTO_OPEN, CHECKED MENUITEM "IDA Font", ID_DEBUGGER_IDA_FONT, CHECKED MENUITEM "ROM Offsets", ID_DEBUGGER_SHOW_ROM_OFFSETS, CHECKED + MENUITEM SEPARATOR + MENUITEM "Break on Bad Opcodes", ID_DEBUGGER_BREAK_BAD_OPCODES, CHECKED MENUITEM SEPARATOR MENUITEM "Reset Window Size", ID_DEBUGGER_RESTORE_SIZE END diff --git a/src/drivers/win/resource.h b/src/drivers/win/resource.h index 6680d9008..99a63bcd1 100644 --- a/src/drivers/win/resource.h +++ b/src/drivers/win/resource.h @@ -1224,6 +1224,7 @@ #define ID_DUMPER_BROWSE 45550 #define ID_DUMPER_GO 45551 #define ID_DUMPER_NES_ADDR_TOGGLE 45552 +#define ID_DEBUGGER_BREAK_BAD_OPCODES 45553 #define MW_VALUELABEL2 65423 #define MW_VALUELABEL1 65426 #define IDC_STATIC_SLASHTEXT 65442