diff options
author | Elena Sayapina <elena.sayapina@jetbrains.com> | 2019-03-07 13:24:46 +0300 |
---|---|---|
committer | Elena Sayapina <elena.sayapina@jetbrains.com> | 2019-03-07 13:24:46 +0300 |
commit | 0deb7d2b29f2b86187eed17b2f7ec5789ed94c59 (patch) | |
tree | 3dc181f7ea8388f2a6f21b9715f6a0a28ab88ff3 | |
parent | 09ed3b57525d105663c2f1d8279f55f947b0969e (diff) | |
download | jdk8u_jdk-0deb7d2b29f2b86187eed17b2f7ec5789ed94c59.tar.gz |
JBR-1260: Wrong calling convention for EnableNonClientDpiScaling in windows/native/sun/windows/awt.hjb8u202-b1530
-rw-r--r-- | src/windows/native/sun/windows/awt.h | 2 | ||||
-rw-r--r-- | src/windows/native/sun/windows/awt_Toolkit.cpp | 17 |
2 files changed, 5 insertions, 14 deletions
diff --git a/src/windows/native/sun/windows/awt.h b/src/windows/native/sun/windows/awt.h index e4d533f8e8..79f17a6e1f 100644 --- a/src/windows/native/sun/windows/awt.h +++ b/src/windows/native/sun/windows/awt.h @@ -64,7 +64,7 @@ typedef enum _DPI_AWARENESS { DPI_AWARENESS_PER_MONITOR_AWARE = 2 } DPI_AWARENESS; */ -typedef BOOL(EnableNonClientDpiScalingFunc)(HWND); +typedef BOOL(WINAPI EnableNonClientDpiScalingFunc)(HWND); //#endif // val >= 0 todo [tav] until switch to VS'12 diff --git a/src/windows/native/sun/windows/awt_Toolkit.cpp b/src/windows/native/sun/windows/awt_Toolkit.cpp index 6ef05d6143..2ebdde0db4 100644 --- a/src/windows/native/sun/windows/awt_Toolkit.cpp +++ b/src/windows/native/sun/windows/awt_Toolkit.cpp @@ -680,19 +680,10 @@ BOOL AwtToolkit::Initialize(BOOL localPump) { CATCH_BAD_ALLOC_RET(FALSE); - SYSTEM_INFO si; - ::ZeroMemory(&si, sizeof(SYSTEM_INFO)); - ::GetNativeSystemInfo(&si); - BOOL is_x86 = (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL); - - BOOL is_wow64; - ::IsWow64Process(::GetCurrentProcess(), &is_wow64); - if (!is_x86 && !is_wow64) { // [tav] EnableNonClientDpiScaling crashes on x86 or WOW64, so just not using it - HMODULE hLibUser32Dll = JDK_LoadSystemLibrary("User32.dll"); - if (hLibUser32Dll != NULL) { - lpEnableNonClientDpiScaling = (EnableNonClientDpiScalingFunc*)GetProcAddress(hLibUser32Dll, "EnableNonClientDpiScaling"); - ::FreeLibrary(hLibUser32Dll); - } + HMODULE hLibUser32Dll = JDK_LoadSystemLibrary("User32.dll"); + if (hLibUser32Dll != NULL) { + lpEnableNonClientDpiScaling = (EnableNonClientDpiScalingFunc*)GetProcAddress(hLibUser32Dll, "EnableNonClientDpiScaling"); + ::FreeLibrary(hLibUser32Dll); } if (tk.m_isWin8OrLater && tk.m_touchKbrdAutoShowIsEnabled) { |