From 7cd0c3337c15a1bda911eda8744ec24cbe1b4605 Mon Sep 17 00:00:00 2001 From: evilynux Date: Sun, 14 Jan 2007 22:18:24 +0000 Subject: [PATCH] - registerTool only when autorefresh is enable. --- desmume/src/gtk-glade/dTools/callbacks_1_ioregs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/gtk-glade/dTools/callbacks_1_ioregs.c b/desmume/src/gtk-glade/dTools/callbacks_1_ioregs.c index bf618f8dd..a8b217ce2 100755 --- a/desmume/src/gtk-glade/dTools/callbacks_1_ioregs.c +++ b/desmume/src/gtk-glade/dTools/callbacks_1_ioregs.c @@ -86,8 +86,6 @@ void on_wtools_1_IOregs_show (GtkWidget *widget, gpointer user_data) { // do as if we had selected this button and ARM7 cpu gtk_combo_box_set_active((GtkComboBox*)combo, 0); - - register_Tool(wtools_1_update); } gboolean on_wtools_1_IOregs_close (GtkWidget *widget, ...) { @@ -102,11 +100,13 @@ void on_wtools_1_autorefresh_toggled (GtkToggleButton *tb, gpointer user_data) if( gtk_toggle_button_get_active(tb) == TRUE ) { autorefresh = TRUE; + register_Tool(wtools_1_update); gtk_widget_set_sensitive( b, FALSE ); } else { autorefresh = FALSE; + unregister_Tool(wtools_1_update); gtk_widget_set_sensitive( b, TRUE ); } }