From c1a656cffe90050237e93d0b4c09e72b20376991 Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Sat, 6 Apr 2013 21:38:24 +1100 Subject: support wineconsole screen resolution --- programs/wineconsole/registry.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/programs/wineconsole/registry.c b/programs/wineconsole/registry.c index 2805f2a..f7facde 100644 --- a/programs/wineconsole/registry.c +++ b/programs/wineconsole/registry.c @@ -24,7 +24,7 @@ #include "windef.h" #include "winbase.h" #include "winreg.h" -#include "winecon_private.h" +#include "wineconsole/winecon_private.h" #include "wine/debug.h" @@ -45,6 +45,7 @@ static const WCHAR wszQuickEdit[] = {'Q','u','i','c','k','E','d','i','t' static const WCHAR wszScreenBufferSize[] = {'S','c','r','e','e','n','B','u','f','f','e','r','S','i','z','e',0}; static const WCHAR wszScreenColors[] = {'S','c','r','e','e','n','C','o','l','o','r','s',0}; static const WCHAR wszWindowSize[] = {'W','i','n','d','o','w','S','i','z','e',0}; +static const WCHAR wszScreenSize[] = {'S','c','r','e','e','n','S','i','z','e',0}; void WINECON_DumpConfig(const char* pfx, const struct config_data* cfg) { @@ -151,6 +152,13 @@ static void WINECON_RegLoadHelper(HKEY hConKey, struct config_data* cfg) cfg->win_width = LOWORD(val); } + count = sizeof(val); + if (!RegQueryValueExW(hConKey, wszScreenSize, 0, &type, (LPBYTE)&val, &count)) + { + cfg->screen_height = HIWORD(val); + cfg->screen_width = LOWORD(val); + } + /* win_pos isn't read from registry */ } @@ -259,6 +267,9 @@ static void WINECON_RegSaveHelper(HKEY hConKey, const struct config_data* cfg) val = MAKELONG(cfg->win_width, cfg->win_height); RegSetValueExW(hConKey, wszWindowSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); + + val = MAKELONG(cfg->screen_width, cfg->screen_height); + RegSetValueExW(hConKey, wszScreenSize, 0, REG_DWORD, (LPBYTE)&val, sizeof(val)); } /****************************************************************** -- 1.7.10.4