Commit 0e6b21ef authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

conhost: Migrate from FontPitchFamily to FontFamily.

To ensure a seamless transition between value names, we try loading the registry value from FontFamily first and FontPitchFamily second. Any changes to the console font family are saved to the new value name.
parent f2a07805
......@@ -166,7 +166,8 @@ 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 ) ||
!RegQueryValueExW( key, L"FontPitchFamily", 0, &type, (BYTE *)&val, &count ))
config->font_pitch_family = val;
count = sizeof(val);
......@@ -330,7 +331,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 ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment