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

Alexandre Julliard julliard at winehq.org
Mon May 30 15:34:56 CDT 2022


Module: wine
Branch: master
Commit: 37bcbe6bcace68ddc56bd2757ca993e2c82e4e7e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=37bcbe6bcace68ddc56bd2757ca993e2c82e4e7e

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Fri May 27 19:57:34 2022 +1000

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 at outlook.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 */




More information about the wine-cvs mailing list