From 84ab3fa4afa7548786c6512f494882e799255229 Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Sat, 6 Apr 2013 21:39:22 +1100 Subject: get screen resolution and save to registry --- programs/wineconsole/wineconsole.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c index bda69a4..90bfaca 100644 --- a/programs/wineconsole/wineconsole.c +++ b/programs/wineconsole/wineconsole.c @@ -24,7 +24,7 @@ #include #include #include "wine/server.h" -#include "winecon_private.h" +#include "wineconsole/winecon_private.h" #include "winnls.h" #include "winuser.h" @@ -576,6 +576,7 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna DWORD ret; struct config_data cfg; STARTUPINFOW si; + RECT workarea; data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*data)); if (!data) return 0; @@ -592,6 +593,12 @@ static struct inner_data* WINECON_Init(HINSTANCE hInst, DWORD pid, LPCWSTR appna /* load settings */ WINECON_RegLoad(appname, &cfg); + /* Save screen resolution to registry */ + SystemParametersInfoA(SPI_GETWORKAREA, 0, &workarea, 0); + cfg.screen_width = workarea.right; + cfg.screen_height = workarea.bottom; + WINECON_RegSave(&cfg); + /* some overrides */ if (pid == 0) { -- 1.7.10.4