diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp index 7c769e147..08e7a663f 100644 --- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp +++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp @@ -209,12 +209,12 @@ HRESULT GetCoreWindowSizeInPixels(const ComPtr displayProperties; + ComPtr displayInformation; - if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(), displayProperties.GetAddressOf()))) + if (SUCCEEDED(GetActivationFactory(HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(), displayInformation.GetAddressOf()))) { float dpi = 96.0f; - if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi))) + if (SUCCEEDED(displayInformation->get_LogicalDpi(&dpi))) { return dpi; } diff --git a/src/common/mathutil.h b/src/common/mathutil.h index dcb7d8d62..774b80506 100644 --- a/src/common/mathutil.h +++ b/src/common/mathutil.h @@ -150,7 +150,7 @@ inline bool supportsSSE2() return supports; } -#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) +#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(_M_ARM) && !defined(_M_ARM64) { int info[4]; __cpuid(info, 0); @@ -884,7 +884,7 @@ inline uint32_t BitfieldReverse(uint32_t value) // Count the 1 bits. #if defined(ANGLE_PLATFORM_WINDOWS) -#if defined(_M_ARM) +#if defined(_M_ARM) || defined(_M_ARM64) inline int BitCount(uint32_t bits) { bits = bits - ((bits >> 1) & 0x55555555); diff --git a/src/common/platform.h b/src/common/platform.h index 8287f5b2e..6de52b500 100644 --- a/src/common/platform.h +++ b/src/common/platform.h @@ -84,7 +84,7 @@ # undef far #endif -#if defined(_MSC_VER) && !defined(_M_ARM) +#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) #include #define ANGLE_USE_SSE #elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))