From e8d696e03128242be33eb0734addee645e894635 Mon Sep 17 00:00:00 2001 From: Joshua Allen Date: Mon, 27 Feb 2017 20:52:26 -0500 Subject: basic config can be written to file --- calibrate_client.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'calibrate_client.c') diff --git a/calibrate_client.c b/calibrate_client.c index 25b6303..897c9e0 100644 --- a/calibrate_client.c +++ b/calibrate_client.c @@ -10,6 +10,8 @@ #include "src/survive_cal.h" #include +#include "src/survive_config.h" + struct SurviveContext * ctx; void HandleKey( int keycode, int bDown ) @@ -152,6 +154,12 @@ int main() CNFGDialogColor = 0x444444; 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 ) -- cgit v1.2.3