aboutsummaryrefslogtreecommitdiff
path: root/midend.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2023-04-23 14:00:40 +0100
committerSimon Tatham <anakin@pobox.com>2023-04-23 14:00:40 +0100
commitc0bd524848f98e5c4a495c4bc31dd55087a28aaa (patch)
treec8f74078ecda6e98f242c9c4ea370203e1a27ea8 /midend.c
parente2add4185cf1e3639b7a320384098d63dc2f3d67 (diff)
downloadpuzzles-c0bd524848f98e5c4a495c4bc31dd55087a28aaa.zip
puzzles-c0bd524848f98e5c4a495c4bc31dd55087a28aaa.tar.gz
puzzles-c0bd524848f98e5c4a495c4bc31dd55087a28aaa.tar.bz2
puzzles-c0bd524848f98e5c4a495c4bc31dd55087a28aaa.tar.xz
Fix failure to update me->ui when changing preferences.
This must have been introduced during a last-minute rebase, or similar - I'm sure it worked a couple of days ago! Because midend_set_config passed a NULL game_ui to midend_set_prefs, the latter would make up a temporary UI and apply the changes to that. As a result, the midend's main UI would keep the original backend preferences, and those would also be the ones saved to the config file.
Diffstat (limited to 'midend.c')
-rw-r--r--midend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/midend.c b/midend.c
index 0d502be..4966e32 100644
--- a/midend.c
+++ b/midend.c
@@ -1998,7 +1998,7 @@ const char *midend_set_config(midend *me, int which, config_item *cfg)
break;
case CFG_PREFS:
- midend_set_prefs(me, NULL, cfg);
+ midend_set_prefs(me, me->ui, cfg);
break;
}