diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-03-21 01:14:13 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-03-21 01:14:13 +0100 |
commit | 52d9b7024689d1f2f5d9932d8bee5cb6e25ce88b (patch) | |
tree | 012b8e74d51949d3585814c1b933bcb5828975ce /walls_conf.c | |
parent | 5ebed0cd5dc2eb2f71e18b24148903f3c10ebf69 (diff) |
Move configuration options to the walls_config_t.
This closes feature #7.
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); +} |