[PATCH] user32: Return correct size for SM_CXSMICON on high-DPI screens.

Ken Thomases ken at codeweavers.com
Sat Aug 1 09:06:03 CDT 2015


On Aug 1, 2015, at 8:49 AM, Mark Harmstone <hellas at burntcomma.com> wrote:

> Wine currently hardcodes the value of SM_CXSMICON in GetSystemMetrics as 16,
> but Windows scales this on high-DPI screens: see https://msdn.microsoft.com/en-us/library/ms701681.aspx.

According to that page, it only scales the results from GetSystemMetrics() for apps which have disabled automatic DPI scaling by calling SetProcessDPIAware().  Which makes sense because if the DPI is 192 and the app thinks the small icon size is 32x32 pixels and draws something that size and then it's scaled again for the DPI, it will appear 4 times the linear pixel size, rather than just the 2 times it should be for the DPI.

-Ken




More information about the wine-devel mailing list