Search
lxdream.org :: lxdream/src/gui/gui.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/gui.c
changeset 28:81c206f59dc7
prev27:1ef09a52cd1e
next30:89b30313d757
author nkeynes
date Sun Dec 25 03:35:08 2005 +0000 (14 years ago)
permissions -rw-r--r--
last change Enable/disable run+stop buttons depending on state
file annotate diff log raw
1.1 --- a/src/gui/gui.c Sun Dec 25 01:28:39 2005 +0000
1.2 +++ b/src/gui/gui.c Sun Dec 25 03:35:08 2005 +0000
1.3 @@ -21,12 +21,14 @@
1.4
1.5 void gtk_gui_init( void );
1.6 void gtk_gui_update( void );
1.7 +void gtk_gui_start( void );
1.8 +void gtk_gui_stop( void );
1.9 int gtk_gui_run_slice( int microsecs );
1.10
1.11 struct dreamcast_module gtk_gui_module = { "Debugger", gtk_gui_init,
1.12 - gtk_gui_update, NULL,
1.13 + gtk_gui_update, gtk_gui_start,
1.14 gtk_gui_run_slice,
1.15 - gtk_gui_update,
1.16 + gtk_gui_stop,
1.17 NULL, NULL };
1.18
1.19 const cpu_desc_t cpu_descs[4] = { &sh4_cpu_desc, &arm_cpu_desc, &armt_cpu_desc, NULL };
1.20 @@ -67,6 +69,25 @@
1.21
1.22 }
1.23
1.24 +/**
1.25 + * Hook called when DC starts running. Just disables the run/step buttons
1.26 + * and enables the stop button.
1.27 + */
1.28 +void gtk_gui_start( void )
1.29 +{
1.30 + debug_win_set_running( main_debug, TRUE );
1.31 +}
1.32 +
1.33 +/**
1.34 + * Hook called when DC stops running. Enables the run/step buttons
1.35 + * and disables the stop button.
1.36 + */
1.37 +void gtk_gui_stop( void )
1.38 +{
1.39 + debug_win_set_running( main_debug, FALSE );
1.40 + gtk_gui_update();
1.41 +}
1.42 +
1.43 int gtk_gui_run_slice( int microsecs )
1.44 {
1.45 while( gtk_events_pending() )
.