Module: wine Branch: stable Commit: 7adf0d869c1b5abb2ef1dd3d8542c774ba97d99c URL: https://source.winehq.org/git/wine.git/?a=commit;h=7adf0d869c1b5abb2ef1dd3d8...
Author: Fabian Maurer dark.shadow4@web.de Date: Sun Apr 22 23:34:38 2018 +0200
wineconsole: When loading settings for an application, respect a 0 in FontSize.
Signed-off-by: Fabian Maurer dark.shadow4@web.de Signed-off-by: Alexandre Julliard julliard@winehq.org (cherry picked from commit 37654ceba8cf4bf2d654f94d51c7551f9f52af5c) Signed-off-by: Michael Stefaniuc mstefani@winehq.org
---
programs/wineconsole/registry.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/programs/wineconsole/registry.c b/programs/wineconsole/registry.c index 080431a..92c53a7 100644 --- a/programs/wineconsole/registry.c +++ b/programs/wineconsole/registry.c @@ -126,8 +126,17 @@ static void WINECON_RegLoadHelper(HKEY hConKey, struct config_data* cfg) count = sizeof(val); if (!RegQueryValueExW(hConKey, wszFontSize, 0, &type, (LPBYTE)&val, &count)) { - cfg->cell_height = HIWORD(val); - cfg->cell_width = LOWORD(val); + int height = HIWORD(val); + int width = LOWORD(val); + /* A value of zero reflects the default settings */ + if (height != 0) + { + cfg->cell_height = height; + } + if (width != 0) + { + cfg->cell_width = width; + } }
count = sizeof(val);