conhost: Save console settings as global defaults on first run.

On Windows, HKCU\Console holds global default settings, while subkeys
hold any app-specific settings that differ from the defaults.

Wine's conhost.exe implementation currently saves all console settings
to an app-specific subkey on the first run, while global defaults are
only saved to HKCU\Console if the user selects 'Set Defaults' from the
pop-up menu and saves new settings. This is the opposite of console
behaviour on Windows.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2022-05-27 19:57:34 +10:00 committed by Alexandre Julliard
parent e5ae7a4026
commit 37bcbe6bca

View file

@ -850,7 +850,7 @@ static void set_first_font( struct console *console, struct console_config *conf
if (fc.pass > 5)
ERR("Unable to find a valid console font\n");
/* Save font configuration to the registry */
/* Update active configuration */
config->cell_width = console->active->font.width;
config->cell_height = console->active->font.height;
config->font_pitch_family = console->active->font.pitch_family;
@ -858,7 +858,8 @@ static void set_first_font( struct console *console, struct console_config *conf
console->active->font.face_len * sizeof(WCHAR) );
config->face_name[console->active->font.face_len] = 0;
save_config( console->window->config_key, config );
/* Save default console configuration to the registry */
save_config( NULL, config );
}
/* Sets the font specified in the LOGFONT as the new console font */