[PATCH] winecfg: Increase range of available screen resolutions
Nigel Liang
ncliang at gmail.com
Thu Oct 11 13:10:52 CDT 2007
diff --git a/programs/winecfg/x11drvdlg.c b/programs/winecfg/x11drvdlg.c
index 0a4e597..79f24bb 100644
--- a/programs/winecfg/x11drvdlg.c
+++ b/programs/winecfg/x11drvdlg.c
@@ -36,8 +36,8 @@ #include "winecfg.h"
WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
#define RES_MAXLEN 5 /* the maximum number of characters in a screen dimension. 5 digits should be plenty, what kind of crazy person runs their screen >10,000 pixels across? */
-#define MINDPI 96
-#define MAXDPI 120
+#define MINDPI 80
+#define MAXDPI 255
#define DEFDPI 96
static const char logpixels_reg[] = "System\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts";
@@ -243,9 +243,13 @@ static void on_d3d_pshader_mode_clicked(
}
static INT read_logpixels_reg(void)
{
+ static const WCHAR szLogPixels[] = {'L','o','g','P','i','x','e','l','s',0};
+ WCHAR szLogPixelsReg[MAXBUFLEN];
+ WCHAR *buf;
DWORD dwLogPixels;
- char *buf = get_reg_key(HKEY_LOCAL_MACHINE, logpixels_reg,
- "LogPixels", NULL);
+
+ MultiByteToWideChar(CP_ACP, 0, logpixels_reg, -1, szLogPixelsReg, -1);
+ buf = get_reg_keyW(HKEY_LOCAL_MACHINE, szLogPixelsReg, szLogPixels, NULL);
dwLogPixels = buf ? *buf : DEFDPI;
HeapFree(GetProcessHeap(), 0, buf);
return dwLogPixels;
--
1.4.1
More information about the wine-patches
mailing list