diff config.c @ 2243:0d1d5dccdd28

Initial implementation of oscilloscope debug view
author Michael Pavone <pavone@retrodev.com>
date Tue, 22 Nov 2022 17:57:02 -0800
parents 0a107b2d5837
children 62f316b76e9a
line wrap: on
line diff
--- a/config.c	Wed Sep 21 23:16:39 2022 -0700
+++ b/config.c	Tue Nov 22 17:57:02 2022 -0800
@@ -285,7 +285,7 @@
 	*pads = tern_insert_node(*pads, key, dupe_tree(val.ptrval));
 }
 
-#define CONFIG_VERSION 5
+#define CONFIG_VERSION 6
 static tern_node *migrate_config(tern_node *config, int from_version)
 {
 	tern_node *def_config = parse_bundled_config("default.cfg");
@@ -361,6 +361,10 @@
 		config = tern_insert_path(config, "io\0ea_multitap\0""3\0", (tern_val){.ptrval = strdup(tap13)}, TVAL_PTR);
 		config = tern_insert_path(config, "io\0ea_multitap\0""4\0", (tern_val){.ptrval = strdup(tap14)}, TVAL_PTR);
 	}
+	case 5: {
+		char *binding_o = tern_find_path_default(config, "bindings\0keys\0o\0", (tern_val){.ptrval = "ui.oscilloscope"}, TVAL_PTR).ptrval;
+		config = tern_insert_path(config, "bindings\0keys\0o\0", (tern_val){.ptrval = strdup(binding_o)}, TVAL_PTR);
+	}
 	}
 	char buffer[16];
 	sprintf(buffer, "%d", CONFIG_VERSION);