diff --git a/src/main.c b/src/main.c index c8162c4..8d94800 100644 --- a/src/main.c +++ b/src/main.c @@ -131,11 +131,9 @@ int main( int argc, char** argv ) do { step_instruction(); - if ( exec_flags & EXEC_BKPT ) { - if ( check_breakpoint( BP_EXEC, saturn.PC ) ) { - enter_debugger |= BREAKPOINT_HIT; - break; - } + if ( ( config.useDebugger ) && ( exec_flags & EXEC_BKPT ) && ( check_breakpoint( BP_EXEC, saturn.PC ) ) ) { + enter_debugger |= BREAKPOINT_HIT; + break; } for ( int i = 0; i < ( int )( sizeof( saturn.keybuf.rows ) / sizeof( saturn.keybuf.rows[ 0 ] ) ); i++ ) { @@ -160,8 +158,6 @@ int main( int argc, char** argv ) schedule(); } while ( !please_exit && !enter_debugger ); - fprintf( stderr, "please_exit = %i, enter_debugger = %i\n", please_exit, enter_debugger ); - if ( enter_debugger ) debug(); } while ( !please_exit );