< prev index next >
src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -91,11 +91,14 @@
HRESULT res = lpD2D1CreateFactory
(D2D1_FACTORY_TYPE_SINGLE_THREADED,
__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();
}
}
}
return;
< prev index next >