[PATCH] wineconsole: When loading settings for an application, respect a 0 in FontSize
Fabian Maurer
dark.shadow4 at web.de
Sun Apr 22 16:34:38 CDT 2018
Fixes bug 44976.
Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
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 080431a5ff..92c53a7ca4 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);
--
2.17.0
More information about the wine-devel
mailing list