[PATCH 0/1] MR1885: conhost: Fix incorrect registry value name
The correct value name is 'FontFamily'. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1885
From: Hugh McMaster <hugh.mcmaster(a)outlook.com> --- programs/conhost/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/conhost/window.c b/programs/conhost/window.c index 3db4b159696..a1f2f380ebf 100644 --- a/programs/conhost/window.c +++ b/programs/conhost/window.c @@ -166,7 +166,7 @@ static void load_registry_key( HKEY key, struct console_config *config ) RegQueryValueExW( key, L"FaceName", 0, &type, (BYTE *)&config->face_name, &count ); count = sizeof(val); - if (!RegQueryValueExW( key, L"FontPitchFamily", 0, &type, (BYTE *)&val, &count )) + if (!RegQueryValueExW( key, L"FontFamily", 0, &type, (BYTE *)&val, &count )) config->font_pitch_family = val; count = sizeof(val); @@ -330,7 +330,7 @@ static void save_registry_key( HKEY key, const struct console_config *config, BO if (save_all || config->font_pitch_family != default_config.font_pitch_family) { val = config->font_pitch_family; - RegSetValueExW( key, L"FontPitchFamily", 0, REG_DWORD, (BYTE *)&val, sizeof(val) ); + RegSetValueExW( key, L"FontFamily", 0, REG_DWORD, (BYTE *)&val, sizeof(val) ); } if (save_all || config->cell_height != default_config.cell_height || -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1885
The only comment I have it that any saved font family settings in the registry will be lost after committing the patch. IMO, for reading, we should try to load (new) FontFamily and if not present, try to load (old) FontPitchFamily. And for saving, always use FontFamily. That way, registry will be transparently updated to new key. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1885#note_20154
participants (3)
-
eric pouech (@epo) -
Hugh McMaster -
Hugh McMaster (@hmc)