diff options
author | Joshua Allen <axlecrusher@gmail.com> | 2017-03-06 22:05:02 -0500 |
---|---|---|
committer | Joshua Allen <axlecrusher@gmail.com> | 2017-03-06 22:05:02 -0500 |
commit | 0ebe84be5824202aecfd87ac58005afa76b36be9 (patch) | |
tree | 4590bd233e8d7e205d69d7d7abbd71e6fac502b2 /calibrate_client.c | |
parent | 19d18fef008792e8918d4ded2dd7fa015bb2fedb (diff) | |
download | libsurvive-0ebe84be5824202aecfd87ac58005afa76b36be9.tar.gz libsurvive-0ebe84be5824202aecfd87ac58005afa76b36be9.tar.bz2 |
Load strings from config files.
I need to finish the loading of numeric values and arrays.
Diffstat (limited to 'calibrate_client.c')
-rw-r--r-- | calibrate_client.c | 18 |
1 files changed, 11 insertions, 7 deletions
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" ); |