From 37bcbe6bcace68ddc56bd2757ca993e2c82e4e7e Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Fri, 27 May 2022 19:57:34 +1000 Subject: [PATCH] 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 Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- programs/conhost/window.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/programs/conhost/window.c b/programs/conhost/window.c index 5e8c3e15a4f..019925789fd 100644 --- a/programs/conhost/window.c +++ b/programs/conhost/window.c @@ -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 */ -- 2.11.4.GIT