src/java.desktop/windows/native/common/awt/systemscale/systemScale.cpp
changeset 59192 a56b7a304bac
parent 58316 718496767a7d
equal deleted inserted replaced
59191:1e8bbeb86204 59192:a56b7a304bac
     1 /*
     1 /*
     2  * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    91             HRESULT res = lpD2D1CreateFactory
    91             HRESULT res = lpD2D1CreateFactory
    92                           (D2D1_FACTORY_TYPE_SINGLE_THREADED,
    92                           (D2D1_FACTORY_TYPE_SINGLE_THREADED,
    93                            __uuidof(ID2D1Factory), NULL,
    93                            __uuidof(ID2D1Factory), NULL,
    94                            &m_pDirect2dFactory);
    94                            &m_pDirect2dFactory);
    95             if (res == S_OK) {
    95             if (res == S_OK) {
       
    96 #pragma warning(push)
       
    97 #pragma warning(disable : 4996) // GetDesktopDpi is deprecated.
    96                 m_pDirect2dFactory->GetDesktopDpi(dpiX, dpiY);
    98                 m_pDirect2dFactory->GetDesktopDpi(dpiX, dpiY);
       
    99 #pragma warning(pop)
    97                 m_pDirect2dFactory->Release();
   100                 m_pDirect2dFactory->Release();
    98             }
   101             }
    99         }
   102         }
   100     }
   103     }
   101     return;
   104     return;