From ae50fa4fee0b41f26b161ad2fd7831815cd396cb Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Wed, 30 Oct 2013 20:51:11 -0400 Subject: [PATCH] Add view menu option to view/hide SFR memory dump window --- src/viewmenu.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/viewmenu.c b/src/viewmenu.c index 99fa0ab..3377329 100644 --- a/src/viewmenu.c +++ b/src/viewmenu.c @@ -71,6 +71,18 @@ void toggle_int_memory(GtkWidget *widget, gpointer data) emugtk_restart_gui(); } +void toggle_sfr_memory(GtkWidget *widget, gpointer data) +{ + if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) { + log_info(" View SFR memory"); + cfg->view_sfr_memory = 1; + } else { + cfg->view_sfr_memory = 0; + } + + emugtk_restart_gui(); +} + void toggle_ext_memory(GtkWidget *widget, gpointer data) { if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) { @@ -167,6 +179,13 @@ ViewAddMenu(GtkWidget *menu_bar) g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(toggle_int_memory), NULL); + item = gtk_check_menu_item_new_with_label("SFR Memory"); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), + cfg->view_sfr_memory); + g_signal_connect(G_OBJECT(item), "activate", + G_CALLBACK(toggle_sfr_memory), NULL); + item = gtk_check_menu_item_new_with_label("External Memory"); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), -- 2.20.1