8233707: systemScale.cpp could not compile with VS2019
authorysuenaga
Wed, 20 Nov 2019 09:28:31 +0900
changeset 59192 a56b7a304bac
parent 59191 1e8bbeb86204
child 59193 b83adf4bd4ee
8233707: systemScale.cpp could not compile with VS2019 Reviewed-by: serb, aivanov
src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp
--- a/src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp	Fri Nov 15 16:58:07 2019 +0530
+++ b/src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp	Wed Nov 20 09:28:31 2019 +0900
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -93,7 +93,10 @@
                            __uuidof(ID2D1Factory), NULL,
                            &m_pDirect2dFactory);
             if (res == S_OK) {
+#pragma warning(push)
+#pragma warning(disable : 4996) // GetDesktopDpi is deprecated.
                 m_pDirect2dFactory->GetDesktopDpi(dpiX, dpiY);
+#pragma warning(pop)
                 m_pDirect2dFactory->Release();
             }
         }