Default to 96dpi for the no config file case
Mike Hearn
mike at navi.cx
Thu May 27 16:18:20 CDT 2004
Hi,
wineprefixcreate doesn't create a config file. This means we use a (wrong)
formula to decide what the DPI is supposed to be. It's wrong because
nobody tells the system how big their monitor is these days so it always
picks a DPI that is too small.
It'd be worth figuring out how Windows calculates this, until then I found
the following patch handy.
Mike Hearn <mike at navi.cx>
Default to 96dpi when not specified in the config file
--- orig/dlls/x11drv/init.c
+++ mod/dlls/x11drv/init.c
@@ -50,8 +50,6 @@
*/
BOOL X11DRV_GDI_Initialize( Display *display )
{
- Screen *screen = DefaultScreenOfDisplay(display);
-
gdi_display = display;
palette_size = X11DRV_PALETTE_Init();
@@ -63,8 +61,7 @@
/* Initialize fonts and text caps */
- log_pixels_x = MulDiv( WidthOfScreen(screen), 254, WidthMMOfScreen(screen) * 10 );
- log_pixels_y = MulDiv( HeightOfScreen(screen), 254, HeightMMOfScreen(screen) * 10 );
+ log_pixels_x = log_pixels_y = 96;
X11DRV_FONT_Init( &log_pixels_x, &log_pixels_y );
horz_size = MulDiv( screen_width, 254, log_pixels_x * 10 );
vert_size = MulDiv( screen_height, 254, log_pixels_y * 10 );
More information about the wine-patches
mailing list