Add support to view/hide SFR memory dump window in config file
authorHugo Villeneuve <hugo@hugovil.com>
Thu, 31 Oct 2013 00:49:21 +0000 (20:49 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Wed, 6 Nov 2013 02:55:34 +0000 (21:55 -0500)
src/app-config.c
src/app-config.h

index 1ac28af..90022f2 100644 (file)
@@ -60,6 +60,7 @@ app_config_init(void)
        /* View menu options */
        cfg->layout = UI_LAYOUT1;
        cfg->view_int_memory = 1;
+       cfg->view_sfr_memory = 1;
        cfg->view_ext_memory = 1;
        cfg->bits_per_row = 16; /* 8 or 16 */
 }
@@ -103,6 +104,8 @@ app_config_load_from_key_file(GKeyFile *kf)
        }
        app_config_key_file_get_int(kf, "view", "int_memory",
                                    &cfg->view_int_memory);
+       app_config_key_file_get_int(kf, "view", "sfr_memory",
+                                   &cfg->view_sfr_memory);
        app_config_key_file_get_int(kf, "view", "ext_memory",
                                    &cfg->view_ext_memory);
        app_config_key_file_get_int(kf, "view", "bits_per_row",
@@ -194,6 +197,8 @@ app_config_save(void)
                g_string_append_printf(buf, "layout=%d\n", cfg->layout);
                g_string_append_printf(buf, "int_memory=%d\n",
                                       cfg->view_int_memory);
+               g_string_append_printf(buf, "sfr_memory=%d\n",
+                                      cfg->view_sfr_memory);
                g_string_append_printf(buf, "ext_memory=%d\n",
                                       cfg->view_ext_memory);
                g_string_append_printf(buf, "bits_per_row=%d\n",
index f153a9d..1c418b5 100644 (file)
@@ -50,6 +50,7 @@ struct app_config_t
        /* View menu options */
        int layout; /* UI Layout 1 or 2 */
        int view_int_memory;
+       int view_sfr_memory;
        int view_ext_memory;
        int bits_per_row; /* 8 or 16 */
 };