Skip to content

Commit c1ac07d

Browse files
config.useDebugger
1 parent 247d0cc commit c1ac07d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/main.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,9 @@ int main( int argc, char** argv )
131131
do {
132132
step_instruction();
133133

134-
if ( exec_flags & EXEC_BKPT ) {
135-
if ( check_breakpoint( BP_EXEC, saturn.PC ) ) {
136-
enter_debugger |= BREAKPOINT_HIT;
137-
break;
138-
}
134+
if ( ( config.useDebugger ) && ( exec_flags & EXEC_BKPT ) && ( check_breakpoint( BP_EXEC, saturn.PC ) ) ) {
135+
enter_debugger |= BREAKPOINT_HIT;
136+
break;
139137
}
140138

141139
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 )
160158
schedule();
161159
} while ( !please_exit && !enter_debugger );
162160

163-
fprintf( stderr, "please_exit = %i, enter_debugger = %i\n", please_exit, enter_debugger );
164-
165161
if ( enter_debugger )
166162
debug();
167163
} while ( !please_exit );

0 commit comments

Comments
 (0)