From 725e4582d9c7174b70fe197bb27345960457549e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 2 May 2012 10:03:48 -0700 Subject: Don't close config file when changing preferences On Linux and MacOS the subsurface_close_conf() doesn't really close the config file (it flushes writes on MacOS), but on Windows it does actually close the registry hkey. Which is bad, if you change the settings multiple times - we assume that the config file is open the whole time. So add a "subsurface_flush_conf()" function, and call *that* when changing configuration parameters. And call the close function only at the very end. Alternatively, maybe we should just open the config file separately every time. I don't much care, maybe somebody else does. Signed-off-by: Linus Torvalds --- display-gtk.h | 1 + 1 file changed, 1 insertion(+) (limited to 'display-gtk.h') diff --git a/display-gtk.h b/display-gtk.h index f12e42996..5a76edce2 100644 --- a/display-gtk.h +++ b/display-gtk.h @@ -38,6 +38,7 @@ typedef enum { extern void subsurface_open_conf(void); extern void subsurface_set_conf(char *name, pref_type_t type, const void *value); extern const void *subsurface_get_conf(char *name, pref_type_t type); +extern void subsurface_flush_conf(void); extern void subsurface_close_conf(void); extern const char *subsurface_USB_name(void); -- cgit v1.2.3-70-g09d2