[PATCH 3/6] conhost: Save default font and console configuration on first run

Hugh McMaster hugh.mcmaster at outlook.com
Mon Apr 11 07:35:52 CDT 2022


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 programs/conhost/window.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/programs/conhost/window.c b/programs/conhost/window.c
index 7564dce51b7..6cccba69d57 100644
--- a/programs/conhost/window.c
+++ b/programs/conhost/window.c
@@ -816,20 +816,17 @@ static int WINAPI get_first_font_sub_enum( const LOGFONTW *lf, const TEXTMETRICW
 
             fc->done = 1;
 
-            /* since we've modified the current config with new font information,
-             * set this information as the new default.
-             */
-            load_config( fc->console->config_key, &config );
+            /* Save default font and console configuration to the registry */
+            load_config( NULL, &config );
+
             config.cell_width  = fc->console->active->font.width;
             config.cell_height = fc->console->active->font.height;
             memcpy( config.face_name, fc->console->active->font.face_name,
                     fc->console->active->font.face_len * sizeof(WCHAR) );
             config.face_name[fc->console->active->font.face_len] = 0;
 
-            /* Force also its writing back to the registry so that we can get it
-             * the next time.
-             */
-            save_config( fc->console->config_key, &config );
+            save_config( NULL, &config );
+
             return 0;
         }
     }
-- 
2.35.1




More information about the wine-devel mailing list