From 0ebe84be5824202aecfd87ac58005afa76b36be9 Mon Sep 17 00:00:00 2001 From: Joshua Allen Date: Mon, 6 Mar 2017 22:05:02 -0500 Subject: Load strings from config files. I need to finish the loading of numeric values and arrays. --- calibrate_client.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'calibrate_client.c') diff --git a/calibrate_client.c b/calibrate_client.c index 08f0715..927f40f 100644 --- a/calibrate_client.c +++ b/calibrate_client.c @@ -142,6 +142,17 @@ void * GuiThread( void * v ) int main() { + + config_init(); + config_read("config.json"); + config_set_str(&global_config_values, "Hello","World!"); + const char *s = config_read_str(&global_config_values, "test123","default"); + printf("%s\n", s); + + +// config_save("config.json"); + + ctx = survive_init( 1 ); survive_install_light_fn( ctx, my_light_process ); @@ -159,13 +170,6 @@ int main() CNFGSetup( "Survive GUI Debug", 640, 480 ); OGCreateThread( GuiThread, 0 ); - config_init(); - config_set_str(&global_config_values, "Hello","World!"); - const char *s = config_read_str(&global_config_values, "TestStr","This is a test."); - printf("%s\n", s); - config_save("config.json"); - - if( !ctx ) { fprintf( stderr, "Fatal. Could not start\n" ); -- cgit v1.2.3