Chromium Code Reviews| Index: chrome/app/chrome_exe_main_win.cc |
| diff --git a/chrome/app/chrome_exe_main_win.cc b/chrome/app/chrome_exe_main_win.cc |
| index 67115ea492add3a5d4b1585bce196e9427445ea4..dccc7fe19307cdd0585f3273beff50979a5bfccd 100644 |
| --- a/chrome/app/chrome_exe_main_win.cc |
| +++ b/chrome/app/chrome_exe_main_win.cc |
| @@ -10,6 +10,7 @@ |
| #include "base/at_exit.h" |
| #include "base/command_line.h" |
| #include "base/files/file_path.h" |
| +#include "base/win/scoped_hdc.h" |
| #include "base/win/windows_version.h" |
| #include "chrome/app/client_util.h" |
| #include "chrome/browser/chrome_process_finder_win.h" |
| @@ -104,6 +105,13 @@ int main() { |
| if (base::win::GetVersion() > base::win::VERSION_VISTA) |
| gfx::EnableHighDPISupport(); |
| + base::win::ScopedGetDC screen_dc(NULL); |
| + int dpi_x = ::GetDeviceCaps(screen_dc, LOGPIXELSX); |
| + if (dpi_x < 140) { |
| + CommandLine::ForCurrentProcess()->AppendSwitchNative( |
| + "force-device-scale-factor", L"1"); |
|
cpu_(ooo_6.6-7.5)
2014/08/28 20:59:37
kForceDeviceScaleFactor ?
|
| + } |
| + |
| if (AttemptFastNotify(*CommandLine::ForCurrentProcess())) |
| return 0; |