From 52d9b7024689d1f2f5d9932d8bee5cb6e25ce88b Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 21 Mar 2010 01:14:13 +0100 Subject: Move configuration options to the walls_config_t. This closes feature #7. --- walls_conf.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'walls_conf.c') diff --git a/walls_conf.c b/walls_conf.c index 7b31d13..812fe98 100644 --- a/walls_conf.c +++ b/walls_conf.c @@ -3,6 +3,8 @@ #include #include "walls_conf.h" +struct walls_config_t config; + GKeyFile *keyfile = NULL; void conf_open() { @@ -63,3 +65,13 @@ void conf_close() { keyfile = NULL; } } + +void conf_load() { + config.interp_type = conf_get_int("walls", "interpolation_mode", GDK_INTERP_NEAREST); + config.max_preload = conf_get_int("walls", "max_preload", 2); +} + +void conf_save() { + g_key_file_set_integer(keyfile, "walls", "interpolation_mode", config.interp_type); + g_key_file_set_integer(keyfile, "walls", "max_preload", config.max_preload); +} -- cgit v1.2.3