diff options
Diffstat (limited to 'walls_conf.c')
-rw-r--r-- | walls_conf.c | 12 |
1 files changed, 12 insertions, 0 deletions
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 <glib/gstdio.h> #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); +} |