diff --git a/src/config.c b/src/config.c index e2e74f2..61fd29f 100644 --- a/src/config.c +++ b/src/config.c @@ -22,6 +22,8 @@ #include "config.h" SYMBOL_EXPORT void InitConfig(struct Game *game) { + const ALLEGRO_FILE_INTERFACE *interface = al_get_new_file_interface(); + al_set_standard_file_interface(); ALLEGRO_PATH *path = al_get_standard_path(ALLEGRO_USER_SETTINGS_PATH); ALLEGRO_PATH *data = al_create_path("SuperDerpy.ini"); al_join_paths(path, data); @@ -29,6 +31,7 @@ SYMBOL_EXPORT void InitConfig(struct Game *game) { if (!game->_priv.config) game->_priv.config=al_create_config(); al_destroy_path(path); al_destroy_path(data); + al_set_new_file_interface(interface); } SYMBOL_EXPORT void SetConfigOption(struct Game *game, char* section, char* name, char* value) { @@ -45,6 +48,8 @@ SYMBOL_EXPORT const char* GetConfigOptionDefault(struct Game *game, char* sectio } SYMBOL_EXPORT void DeinitConfig(struct Game *game) { + const ALLEGRO_FILE_INTERFACE *interface = al_get_new_file_interface(); + al_set_standard_file_interface(); ALLEGRO_PATH *path = al_get_standard_path(ALLEGRO_USER_SETTINGS_PATH); ALLEGRO_PATH *data = al_create_path("SuperDerpy.ini"); al_make_directory(al_path_cstr(path, ALLEGRO_NATIVE_PATH_SEP)); @@ -53,4 +58,5 @@ SYMBOL_EXPORT void DeinitConfig(struct Game *game) { al_destroy_path(path); al_destroy_path(data); al_destroy_config(game->_priv.config); + al_set_new_file_interface(interface); }