changeset 57030:a56b7a304bac

8233707: systemScale.cpp could not compile with VS2019 Reviewed-by: serb, aivanov
author ysuenaga
date Wed, 20 Nov 2019 09:28:31 +0900
parents 1e8bbeb86204
children b83adf4bd4ee
files src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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();
             }
         }